mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Fix Error
This commit is contained in:
@@ -31,16 +31,16 @@ module.exports = class BanCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('BAN_MEMBERS');
|
||||
return msg.member.hasPermission('BAN_MEMBERS');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('BAN_MEMBERS'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS'))
|
||||
return message.say('This Command requires the `Ban Members` Permission.');
|
||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||
if (!modlogs)
|
||||
return message.say('This Command requires a channel named `mod_logs`.');
|
||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
||||
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||
return message.say('This Command requires the `Embed Links` Permission.');
|
||||
const { member, reason } = args;
|
||||
if (!member.bannable)
|
||||
|
||||
@@ -28,16 +28,16 @@ module.exports = class KickCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('KICK_MEMBERS');
|
||||
return msg.member.hasPermission('KICK_MEMBERS');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('KICK_MEMBERS'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS'))
|
||||
return message.say('This Command requires the `Kick Members` Permission.');
|
||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||
if (!modlogs)
|
||||
return message.say('This Command requires a channel named `mod_logs`.');
|
||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
||||
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||
return message.say('This Command requires the `Embed Links` Permission.');
|
||||
const { member, reason } = args;
|
||||
if (!member.kickable)
|
||||
|
||||
@@ -23,11 +23,11 @@ module.exports = class LockdownCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('ADMINISTRATOR');
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ADMINISTRATOR'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('ADMINISTRATOR'))
|
||||
return message.say('This Command requires the `Administrator` Permission.');
|
||||
const { type } = args;
|
||||
if (type === 'start') {
|
||||
|
||||
@@ -26,13 +26,13 @@ module.exports = class PruneCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('MANAGE_MESSAGES');
|
||||
return msg.member.hasPermission('MANAGE_MESSAGES');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('READ_MESSAGE_HISTORY'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGE_HISTORY'))
|
||||
return message.say('This Command requires the `Read Message History` Permission.');
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('MANAGE_MESSAGES'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES'))
|
||||
return message.say('This Command requires the `Manage Messages` Permission.');
|
||||
let { count } = args;
|
||||
count = count + 1;
|
||||
|
||||
@@ -35,16 +35,16 @@ module.exports = class UnbanCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('BAN_MEMBERS');
|
||||
return msg.member.hasPermission('BAN_MEMBERS');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('BAN_MEMBERS'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS'))
|
||||
return message.say('This Command requires the `Ban Members` Permission.');
|
||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||
if (!modlogs)
|
||||
return message.say('This Command requires a channel named `mod_logs`.');
|
||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
||||
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||
return message.say('This Command requires the `Embed Links` Permission.');
|
||||
const { memberID, reason } = args;
|
||||
const bans = await message.guild.fetchBans();
|
||||
|
||||
@@ -27,14 +27,14 @@ module.exports = class WarnCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.permissions.has('MANAGE_MESSAGES');
|
||||
return msg.member.hasPermission('MANAGE_MESSAGES');
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||
if (!modlogs)
|
||||
return message.say('This Command requires a channel named `mod_logs`.');
|
||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
||||
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||
return message.say('This Command requires the `Embed Links` Permission.');
|
||||
const { member, reason } = args;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user