1
0
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:
toast-ts 2023-05-31 09:44:19 +10:00
parent 846717c72a
commit cb2fd3b47f

View File

@ -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;