fix: 修复无群名片时at带上了昵称的问题

This commit is contained in:
ikechan8370 2023-04-16 00:48:32 +08:00
parent 7c36f9361e
commit 70472464cf

View file

@ -551,9 +551,13 @@ export class chatgpt extends plugin {
let me = mm.get(Bot.uin) let me = mm.get(Bot.uin)
let card = me.card let card = me.card
let nickname = me.nickname let nickname = me.nickname
if (card) {
prompt = prompt.replace(`@${card}`, '').trim() prompt = prompt.replace(`@${card}`, '').trim()
}
if (nickname) {
prompt = prompt.replace(`@${nickname}`, '').trim() prompt = prompt.replace(`@${nickname}`, '').trim()
} }
}
} else { } else {
let ats = e.message.filter(m => m.type === 'at') let ats = e.message.filter(m => m.type === 'at')
if (!e.atme && ats.length > 0) { if (!e.atme && ats.length > 0) {