Files
xiao/commands/settings/single-role.js
T
Daniel Odendahl Jr 7802bb49cb Clean-Ups
2017-05-31 04:41:01 +00:00

28 lines
853 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class SingleRoleCommand extends Command {
constructor(client) {
super(client, {
name: 'single-role',
group: 'settings',
memberName: 'single-role',
description: 'Sets a single role that is able to use commands.',
guildOnly: true,
userPermissions: ['ADMINISTRATOR'],
args: [
{
key: 'role',
prompt: 'What role should be able to use commands?',
type: 'role'
}
]
});
}
run(msg, args) {
const { role } = args;
msg.guild.settings.set('singleRole', role.id);
return msg.say(`Single role mode has been enabled with the role ${role.name}.`);
}
};