This commit is contained in:
Daniel Odendahl Jr
2017-05-19 14:14:27 +00:00
parent d23cd3e58e
commit 0ede46a84a
+1 -1
View File
@@ -69,7 +69,7 @@ client.on('commandError', (command, err) => {
client.on('message', async (msg) => {
if (msg.guild && msg.guild.settings.get('guard') && /(discord(.gg\/|app.com\/invite\/))/g.test(msg.content)) {
if (msg.author.id === client.user.id) return;
if (msg.channel.permissionsFor(client.user).has('ADMINISTRATOR')) return;
if (msg.member.hasPermission('ADMINISTRATOR')) return;
if (msg.member.roles.has(msg.guild.settings.get('staffRole'))) return;
if (!msg.channel.permissionsFor(client.user).has('SEND_MESSAGES')) return;
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete();