This commit is contained in:
Daniel Odendahl Jr
2017-05-28 02:35:38 +00:00
parent 208652d270
commit e65f647907
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}