diff --git a/commands/util-voice/leave.js b/commands/util-voice/leave.js index 8e9e9fa2..5b1a9f19 100644 --- a/commands/util-voice/leave.js +++ b/commands/util-voice/leave.js @@ -20,6 +20,9 @@ module.exports = class LeaveCommand extends Command { const usage = this.client.registry.commands.get('stop').usage(); return msg.reply(`I am currently playing audio in this server. Please use ${usage} first.`); } + 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.leave(); return msg.reply(`Left **${connection.channel.name}**...`); } diff --git a/commands/util-voice/pause.js b/commands/util-voice/pause.js index 19fdf869..c972ee21 100644 --- a/commands/util-voice/pause.js +++ b/commands/util-voice/pause.js @@ -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.'); } diff --git a/commands/util-voice/resume.js b/commands/util-voice/resume.js index 531196d0..a67abd46 100644 --- a/commands/util-voice/resume.js +++ b/commands/util-voice/resume.js @@ -19,6 +19,9 @@ module.exports = class ResumeCommand 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.unpause(); return msg.reply('Resumed playing.'); } diff --git a/commands/util-voice/stop.js b/commands/util-voice/stop.js index 163ce07c..c01f50fa 100644 --- a/commands/util-voice/stop.js +++ b/commands/util-voice/stop.js @@ -19,6 +19,9 @@ module.exports = class StopCommand 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.stop(); return msg.reply('Stopped playing.'); }