Discord.js v14

This commit is contained in:
Dragon Fire
2024-04-07 19:06:19 -04:00
parent 58c81aa912
commit f59826f7ab
272 changed files with 893 additions and 656 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
module.exports = class LeaveCommand extends Command {
constructor(client) {
@@ -20,7 +21,7 @@ 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')) {
if (!connection.channel.permissionsFor(msg.author).has(PermissionFlagsBits.MoveMembers)) {
return msg.reply(`You need the "MOVE_MEMBERS" permission to use the \`${this.name}\` command.`);
}
connection.leave();