feat: added /shuffle command

This commit is contained in:
Marius Begby committed 2023-07-26 19:07:36 +02:00
1 parent 71aff0923f
commit 83d5336e17
3 files changed
+72 -1

No files matched your search

+20
View File
@@ -41,3 +41,23 @@ exports.queueNoCurrentTrack = async (interaction, queue) => {
return false;
};
exports.queueIsEmpty = async (interaction, queue) => {
if (queue.tracks.data.length === 0) {
await interaction.editReply({
embeds: [
new EmbedBuilder()
.setDescription(
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks added to the queue. First add some tracks with **\`/play\`**!`
)
.setColor(embedOptions.colors.warning)
]
});
logger.debug(`User tried to use command ${interaction.commandName} but there was no tracks in the queue.`);
return true;
}
return false;
};