diff options
| author | Fuwn <[email protected]> | 2025-10-24 00:50:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-10-24 00:50:14 -0700 |
| commit | b954b8ae81047c68a0e52309c855eb23b3c0e800 (patch) | |
| tree | ebb5c09b5fae146615696accf7fefa76278ddee3 /packages | |
| parent | fix(shared:log): Use correct stack offset for unit (diff) | |
| download | umabotdiscord-b954b8ae81047c68a0e52309c855eb23b3c0e800.tar.xz umabotdiscord-b954b8ae81047c68a0e52309c855eb23b3c0e800.zip | |
fix(listeners:autoDeletion): Fix banned string and inspection logic
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/gateway/src/listeners/autoDeletion.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/gateway/src/listeners/autoDeletion.ts b/packages/gateway/src/listeners/autoDeletion.ts index bf503e1..088cfad 100644 --- a/packages/gateway/src/listeners/autoDeletion.ts +++ b/packages/gateway/src/listeners/autoDeletion.ts @@ -2,7 +2,7 @@ import { Client, Events, Message } from "discord.js"; import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../constants"; import { logUnexpectedDiscordAPIError } from "../utilities"; -const BANNED_STRINGS = ["@https://cdn.miki.bot/ext/imgh/1dGU5ggsHZ.gif"]; +const BANNED_STRINGS = ["https://cdn.miki.bot/ext/imgh/1dGU5ggsHZ.gif"]; const containsBannedString = (message: Message): boolean => { const content = message.content.toLowerCase(); @@ -49,6 +49,12 @@ const containsBannedString = (message: Message): boolean => { embed.author.name.toLowerCase().includes(bannedString.toLowerCase()) ) return true; + + if ( + embed.image?.url && + embed.image.url.toLowerCase().includes(bannedString.toLowerCase()) + ) + return true; } return false; |