diff --git a/apps/chat.js b/apps/chat.js index 340201f..a94f0eb 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -2007,8 +2007,9 @@ export class chatgpt extends plugin { tools.push(...[new EditCardTool(), new JinyanTool(), new KickOutTool(), new HandleMessageMsgTool()]) // 用于撤回和加精的id option.systemMessage += `\nthis last message id is ${e.message_id}` - if (e.source?.message_id) { - option.systemMessage += `\nthis last message is replying to ${e.source.message_id}: ${(await e.group.getChatHistory(e.source.seq, 1)).pop()?.raw_message}` + if (e.source?.seq) { + let source = (await e.group.getChatHistory(e.source?.seq, 1)).pop() + option.systemMessage += `\nthis last message is replying to ${source.message_id}: ${source?.raw_message}` } } }