mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
a
This commit is contained in:
+4
-2
@@ -57,8 +57,10 @@ client.on('message', (msg) => {
|
|||||||
if (msg.author.bot || msg.member.hasPermission('ADMINISTRATOR')) return;
|
if (msg.author.bot || msg.member.hasPermission('ADMINISTRATOR')) return;
|
||||||
const topic = msg.guild.defaultChannel.topic || '';
|
const topic = msg.guild.defaultChannel.topic || '';
|
||||||
if (!topic.includes('<inviteguard>')) return;
|
if (!topic.includes('<inviteguard>')) return;
|
||||||
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete();
|
if (/(discord(\.gg\/|app\.com\/invite\/|\.me\/))/gi.test(msg.content)) {
|
||||||
msg.reply('Invites are prohibited from being posted here.');
|
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete();
|
||||||
|
msg.reply('Invites are prohibited from being posted here.');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('guildMemberAdd', (member) => {
|
client.on('guildMemberAdd', (member) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user