fix: time

This commit is contained in:
ikechan8370 2025-04-07 00:33:35 +08:00
parent 7be0e61e14
commit 3318ac04d8
3 changed files with 65 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import { getBotFramework } from './bot.js'
import ChatGPTConfig from '../config/config.js'
import {formatTimeToBeiJing} from './common.js'
export class GroupContextCollector {
/**
@ -132,7 +133,7 @@ export async function getGroupContextPrompt (e, length) {
// eslint-disable-next-line no-template-curly-in-string
.replace('${message.sender.title}', sender.title || '-')
// eslint-disable-next-line no-template-curly-in-string
.replace('${message.time}', chat.time || '-')
.replace('${message.time}', formatTimeToBeiJing(chat.time) || '-')
// eslint-disable-next-line no-template-curly-in-string
.replace('${message.messageId}', chat.messageId || '-')
// eslint-disable-next-line no-template-curly-in-string