mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
ID-Based Guild Settings
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user