Single Role Error Message

This commit is contained in:
Daniel Odendahl Jr
2017-05-14 04:13:17 +00:00
parent ce4a52779f
commit b27a0260b1
+2 -1
View File
@@ -71,7 +71,8 @@ client.on('message', async (msg) => {
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;
if (!msg.member.roles.has(singleRole))
return msg.reply(`Only the ${msg.guild.roles.get(singleRole).name} role may use commands.`);
}
msg.channel.startTyping();
const message = msg.content.replace(mention, '');