CommandoClient, Change Filenames, etc.

This commit is contained in:
Daniel Odendahl Jr
2017-05-23 16:14:48 +00:00
parent 38674485d1
commit 67f888e7b0
44 changed files with 77 additions and 54 deletions
+30
View File
@@ -0,0 +1,30 @@
const { Command } = require('discord.js-commando');
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,
args: [
{
key: 'role',
prompt: 'What role should be able to use commands?',
type: 'role'
}
]
});
}
hasPermission(msg) {
return msg.member.hasPermission('ADMINISTRATOR');
}
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}.`);
}
};