feat: qq表情和真的群聊at

This commit is contained in:
ikechan8370 2023-03-28 19:50:51 +08:00
parent cae324f250
commit cc2c561224
3 changed files with 547 additions and 2 deletions

View file

@ -21,6 +21,7 @@ import fetch from 'node-fetch'
import { deleteConversation, getConversations, getLatestMessageIdByConversationId } from '../utils/conversation.js'
import { convertSpeaker, generateAudio, speakers } from '../utils/tts.js'
import ChatGLMClient from '../utils/chatglm.js'
import {convertFaces} from "../utils/face.js";
try {
await import('keyv')
} catch (err) {
@ -767,7 +768,7 @@ export class chatgpt extends plugin {
audioErr = true
}
if (Config.alsoSendText || audioErr) {
await this.reply(`${response}`, e.isGroup)
await this.reply(await convertFaces(response, Config.enableRobotAt, e), e.isGroup)
if (quotemessage.length > 0) {
this.reply(await makeForwardMsg(this.e, quotemessage))
}
@ -798,7 +799,7 @@ export class chatgpt extends plugin {
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
}
} else {
await this.reply(`${response}`, e.isGroup)
await this.reply(await convertFaces(response, Config.enableRobotAt, e), e.isGroup)
if (quotemessage.length > 0) {
this.reply(await makeForwardMsg(this.e, quotemessage))
}