From e0fe64b06c0eb8b92578ae1bf5a166f8d633c9b3 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 2 Dec 2022 00:31:17 -0500 Subject: Fixed duration date; More stop functions; Required in voice channel --- commands/leave.js | 1 + 1 file changed, 1 insertion(+) (limited to 'commands/leave.js') diff --git a/commands/leave.js b/commands/leave.js index 781bc0a..1577baa 100644 --- a/commands/leave.js +++ b/commands/leave.js @@ -29,6 +29,7 @@ export default { .setDescription('Leaves the voice chat') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), async execute(interaction) { + if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); console.log('Leaving voice channel...'); await destroyAudio(interaction); return await interaction.reply({ content: 'Leaving voice channel', ephemeral: true }); -- cgit v1.2.3