Skip to content

Commit

Permalink
chore: Fix color fallback for config.config.color.info in play.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyphen1223 committed May 22, 2024
1 parent c6251dd commit f2737d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions commands/music/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ module.exports = {
].data.encoded,
},
});
return;
}
case 'search': {
if (!result?.data.length) {
Expand Down
1 change: 1 addition & 0 deletions util/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function createMusicEmbed(guildId, mode, type) {
globalThis.queue[guildId].queue[globalThis.queue[guildId].index].user.id
}>`;
}
console.log(await globalThis.queue[guildId].player.get());
const embed = new EmbedBuilder()
.setColor(config.config?.color?.info || '#000000')
.addFields(
Expand Down
6 changes: 5 additions & 1 deletion util/playerEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const listenEvents = async (guildId) => {
globalThis.queue[guildId].player.status = 'playing';
globalThis.queue[guildId].suppressEnd = false;
const embed = await createMusicEmbed(guildId, 'Start');
if (globalThis.queue[guildId].panel) globalThis.queue[guildId].panel.delete();
if (globalThis.queue[guildId].panel)
return await globalThis.queue[guildId].panel.edit({
embeds: [embed],
components: createButton(),
});
globalThis.queue[guildId].panel = await globalThis.queue[
guildId
].textChannel.send({
Expand Down

0 comments on commit f2737d7

Please sign in to comment.