mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Fix the broken advertisement automod.
This commit is contained in:
parent
846717c72a
commit
cb2fd3b47f
@ -41,7 +41,7 @@ export default {
|
||||
message.channel.send('That word isn\'t allowed here.').then(x=>setTimeout(()=>x.delete(), 10000));
|
||||
await repeatedMessages(30000, 3, 'bw', '30m', 'Constant swearing');
|
||||
} else if (message.content.toLowerCase().includes('discord.gg/') && !client.isStaff(message.member as Discord.GuildMember)){
|
||||
const url = msgarr.find(x=>x.includes('discord.gg/'));
|
||||
const url = message.content.split(' ').find(x=>x.includes('discord.gg/'));
|
||||
const validInvite = await client.fetchInvite(url).catch(()=>undefined);
|
||||
if (validInvite && validInvite.guild?.id !== client.config.mainServer.id){
|
||||
automodded = true;
|
||||
|
Loading…
Reference in New Issue
Block a user