From e7f0af8e6e58b822719a00eacebfceb2a1154523 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sat, 29 Nov 2025 11:23:27 +0800 Subject: [PATCH] idk --- client-protocol/Message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-protocol/Message.ts b/client-protocol/Message.ts index 1d806ee..44f3882 100644 --- a/client-protocol/Message.ts +++ b/client-protocol/Message.ts @@ -184,8 +184,8 @@ export default class Message extends BaseClientObject { if (fileType != null && /tws:\/\/file\?hash=[A-Za-z0-9]+$/.test(href)) { const file_hash = /^tws:\/\/file\?hash=(.*)/.exec(href)?.[1]! - let file_name: string = /^Video|File|Image=(.*)/.exec(text)?.[1] || text - file_name.trim() == '' && (file_name = 'Unnamed File') + let file_name: string = /^(Video|File|Image)=(.*)/.exec(text)?.[2] || text + file_name.trim() == '' && (file_name = 'Unnamed_File') return attachment ? attachment({ text: text, attachment: new ChatAttachment(this.client, { file_hash, file_name }), fileType: fileType, }) : text } if (mentionType != null && /^tws:\/\/chat\?id=[A-Za-z0-9]+/.test(href)) {