Fix Double Error on Single Role

This commit is contained in:
Daniel Odendahl Jr
2017-05-14 04:18:57 +00:00
parent b27a0260b1
commit 13ed16296c
+2 -4
View File
@@ -69,10 +69,8 @@ client.on('message', async (msg) => {
if (msg.author.bot) return;
if (msg.channel.type !== 'dm') {
if (!msg.channel.permissionsFor(client.user).has('SEND_MESSAGES')) return;
const singleRole = msg.guild.settings.get('singleRole');
if (singleRole)
if (!msg.member.roles.has(singleRole))
return msg.reply(`Only the ${msg.guild.roles.get(singleRole).name} role may use commands.`);
const role = msg.guild.settings.get('singleRole');
if (role && !msg.member.roles.has(role)) return;
}
msg.channel.startTyping();
const message = msg.content.replace(mention, '');