Files
xiao/commands/util/staffrole.js
T
Daniel Odendahl Jr 52e299b1b4 Auto-Aliases
2017-05-07 17:34:59 +00:00

31 lines
858 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class StaffRoleCommand extends Command {
constructor(client) {
super(client, {
name: 'staff-role',
group: 'util',
memberName: 'staff-role',
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.hasPermission('ADMINISTRATOR');
}
run(msg, args) {
const { role } = args;
msg.guild.settings.set('staffRole', role.id);
return msg.say(`Server Staff role set to ${role.name}.`);
}
};