This commit is contained in:
Daniel Odendahl Jr
2017-06-01 09:01:41 +00:00
parent 9a9063f40c
commit 66706d9c7b
+4 -1
View File
@@ -53,8 +53,11 @@ client.on('warn', console.warn);
client.on('commandError', (command, err) => console.error(command.name, err));
client.dispatcher.addInhibitor(msg => {
if (msg.channel.type === 'dm') {
return false;
}
const role = msg.guild.settings.get('singleRole');
if (!msg.guild || !msg.guild.roles.has(role) || msg.member.hasPermission('ADMINISTRATOR')) {
if (!msg.guild.roles.has(role) || msg.member.hasPermission('ADMINISTRATOR')) {
return false;
}
if (!msg.member.roles.has(role)) {