fix(cp): 重新断定 parseWithTransformers 返回类型

This commit is contained in:
CrescentLeaf
2025-11-28 23:49:12 +08:00
parent ca565e3c3e
commit 31e627ce20

View File

@@ -91,7 +91,8 @@ export default class Message extends BaseClientObject {
attachment?: ({ text, fileType, attachment }: { text: string, fileType: FileType, attachment: ChatAttachment }) => string, attachment?: ({ text, fileType, attachment }: { text: string, fileType: FileType, attachment: ChatAttachment }) => string,
mention?: ({ text, mentionType, mention }: { text: string, mentionType: MentionType, mention: ChatMention }) => string, mention?: ({ text, mentionType, mention }: { text: string, mentionType: MentionType, mention: ChatMention }) => string,
}) { }) {
new marked.Marked({ return new marked.Marked({
async: false,
extensions: [ extensions: [
{ {
name: 'image', name: 'image',
@@ -119,7 +120,7 @@ export default class Message extends BaseClientObject {
}, },
} }
] ]
}).parse(this.getText()) }).parse(this.getText()) as string
} }
getAttachments() { getAttachments() {
const attachments: ChatAttachment[] = [] const attachments: ChatAttachment[] = []