Require MOVE_MEMBERS for voice commands

This commit is contained in:
Dragon Fire
2024-04-06 16:17:00 -04:00
parent 850b148a75
commit fd83cf3300
4 changed files with 12 additions and 0 deletions
+3
View File
@@ -19,6 +19,9 @@ module.exports = class PauseCommand extends Command {
if (connection.canPlay) {
return msg.reply('I am not currently playing audio in this server.');
}
if (!connection.channel.permissionsFor(msg.author).has('MOVE_MEMBERS')) {
return msg.reply(`You need the "MOVE_MEMBERS" permission to use the \`${this.name}\` command.`);
}
connection.pause();
return msg.reply('Paused playing.');
}