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