This commit is contained in:
Daniel Odendahl Jr
2017-05-04 20:48:07 +00:00
parent e560359445
commit b66da03c74
+2
View File
@@ -38,6 +38,8 @@ client.registry
client.dispatcher.addInhibitor(msg => {
const role = msg.guild.settings.get('singleRole');
if(!role) return false;
if(client.isOwner(msg.author)) return false;
if(msg.member.hasPermission('ADMINISTRATOR')) return false;
if(!msg.member.roles.has(role))
return `Only the ${msg.guild.roles.get(role).name} may use commands.`;
});