diff --git a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts index ba8e4e59..4ae2b65e 100644 --- a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts +++ b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts @@ -32,6 +32,12 @@ export const MatchAttachmentTypeTrigger = automodTrigger()({ const attachments: any[] = context.message.data.attachments; for (const attachment of attachments) { + // FIXME: Hotfix + if (!attachment.filename) { + console.warn("No attachment filename:", attachment); + continue; + } + const attachmentType = attachment.filename .split(".") .pop()