aboutsummaryrefslogtreecommitdiff
path: root/commands/leave.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/leave.js')
-rw-r--r--commands/leave.js1
1 files changed, 1 insertions, 0 deletions
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 });