mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
You must be in the voice channel to remove the bot
This commit is contained in:
@@ -16,6 +16,9 @@ module.exports = class LeaveCommand extends Command {
|
||||
run(msg) {
|
||||
const connection = this.client.voice.connections.get(msg.guild.id);
|
||||
if (!connection) return msg.reply('I am not in a voice channel.');
|
||||
if (!connection.channel.members.has(msg.author.id)) {
|
||||
return msg.reply('You must be in the voice channel to remove me from it.');
|
||||
}
|
||||
if (!msg.channel.permissionsFor(msg.author).has('MOVE_MEMBERS') && connection.channel.members.size > 2) {
|
||||
return msg.reply('You need the "Move members" permission to remove me from this voice channel.');
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "129.8.0",
|
||||
"version": "129.8.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user