mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Make Xiao not fire invite
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user