1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00

Fix the broken advertisement automod.

This commit is contained in:
AnxietyisReal 2023-05-31 09:44:19 +10:00
parent 884e787aed
commit 1d248554d1

View File

@ -41,7 +41,7 @@ export default {
message.channel.send('That word isn\'t allowed here.').then(x=>setTimeout(()=>x.delete(), 10000)); message.channel.send('That word isn\'t allowed here.').then(x=>setTimeout(()=>x.delete(), 10000));
await repeatedMessages(30000, 3, 'bw', '30m', 'Constant swearing'); await repeatedMessages(30000, 3, 'bw', '30m', 'Constant swearing');
} else if (message.content.toLowerCase().includes('discord.gg/') && !client.isStaff(message.member as Discord.GuildMember)){ } 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); const validInvite = await client.fetchInvite(url).catch(()=>undefined);
if (validInvite && validInvite.guild?.id !== client.config.mainServer.id){ if (validInvite && validInvite.guild?.id !== client.config.mainServer.id){
automodded = true; automodded = true;