3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00
This commit is contained in:
Dragory 2021-08-18 22:29:46 +03:00
parent f188cc1e47
commit 14dcbe2f9d

View file

@ -32,6 +32,12 @@ export const MatchAttachmentTypeTrigger = automodTrigger<MatchResultType>()({
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()