Make Xiao not fire invite

This commit is contained in:
Daniel Odendahl Jr
2017-05-19 13:49:16 +00:00
parent da1fb7b255
commit d23cd3e58e
+1
View File
@@ -68,6 +68,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.roles.has(msg.guild.settings.get('staffRole'))) return;
if (!msg.channel.permissionsFor(client.user).has('SEND_MESSAGES')) return;