Files
xiao/commands/util/staffrole.js
T
Daniel Odendahl Jr 877f720cfc msg
2017-04-30 22:56:59 +00:00

29 lines
814 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class StaffRoleCommand extends Command {
constructor(client) {
super(client, {
name: 'staffrole',
group: 'util',
memberName: 'staffrole',
description: 'Sets the role that can use Mod Commands without perms.',
guildOnly: true,
args: [{
key: 'role',
prompt: 'What role should be staff?',
type: 'role'
}]
});
}
hasPermission(msg) {
return msg.member.permissions.has('ADMINISTRATOR');
}
run(msg, args) {
const { role } = args;
msg.guild.settings.set('staffRole', role.name);
return msg.say(`Server Staff role set to ${role.name}.`);
}
};