3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00
This commit is contained in:
Dragory 2021-08-18 22:29:46 +03:00
parent 7870b3257b
commit e3c9dbf851
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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()