From 31e627ce20e5a5b62d63c823c0d1edfecd1a37c3 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Fri, 28 Nov 2025 23:49:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(cp):=20=E9=87=8D=E6=96=B0=E6=96=AD=E5=AE=9A?= =?UTF-8?q?=20parseWithTransformers=20=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client-protocol/Message.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client-protocol/Message.ts b/client-protocol/Message.ts index 1f4c571..336e147 100644 --- a/client-protocol/Message.ts +++ b/client-protocol/Message.ts @@ -91,7 +91,8 @@ export default class Message extends BaseClientObject { attachment?: ({ text, fileType, attachment }: { text: string, fileType: FileType, attachment: ChatAttachment }) => string, mention?: ({ text, mentionType, mention }: { text: string, mentionType: MentionType, mention: ChatMention }) => string, }) { - new marked.Marked({ + return new marked.Marked({ + async: false, extensions: [ { name: 'image', @@ -119,7 +120,7 @@ export default class Message extends BaseClientObject { }, } ] - }).parse(this.getText()) + }).parse(this.getText()) as string } getAttachments() { const attachments: ChatAttachment[] = []