Skip to content

Commit

Permalink
attempt to preserve messages in automod channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Token07 committed Aug 15, 2024
1 parent 04c0759 commit 3e0edb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/SpamKiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export default class SpamKiller {
async onMessage(message: Discord.Message) {
if (!message.guild || message.author.bot)
return;
// Stop Botty from acting on message on AutoMod alert channel
if (message.member && !(message.guild.channels.cache.find(c => c.id == message.channelId)?.permissionsFor(message.member)?.has(Discord.PermissionFlagsBits.SendMessages, true)))
return;

// Functions return true if they delete the message. This makes sure that a message only gets deleted once
this.checkInviteLinkSpam(message) ||
Expand Down

0 comments on commit 3e0edb7

Please sign in to comment.