mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Oops
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = class BanCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('BAN_MEMBERS')) return 'You do not have the `Ban Members` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = class KickCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class LockdownCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ module.exports = class PruneCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('MANAGE_MESSAGES')) return 'You do not have the `Manage Messages` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('BAN_MEMBERS')) return 'You do not have the `Ban Members` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = class WarnCommand extends Command {
|
||||
|
||||
hasPermission(msg) {
|
||||
const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole'));
|
||||
if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`;
|
||||
if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`;
|
||||
else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user