ID-Based Guild Settings

This commit is contained in:
Daniel Odendahl Jr
2017-05-03 20:44:45 +00:00
parent 3268a30118
commit 3abc9b1b08
13 changed files with 28 additions and 26 deletions
+3 -3
View File
@@ -31,13 +31,13 @@ module.exports = class WarnCommand extends Command {
}
hasPermission(msg) {
return msg.member.hasPermission('KICK_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff'));
return msg.member.hasPermission('KICK_MEMBERS') || msg.member.roles.has(msg.guild.settings.get('staffRole'));
}
async run(msg, args) {
const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs'));
const modlogs = msg.guild.channels.get(msg.guild.settings.get('modLog', 'mod_logs'));
if (!modlogs)
return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.');
return msg.say('This Command requires a channel set with the `modchannel` command.');
if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { member, reason } = args;