mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: 修复无群名片时at带上了昵称的问题
This commit is contained in:
parent
7c36f9361e
commit
70472464cf
1 changed files with 6 additions and 2 deletions
|
|
@ -551,8 +551,12 @@ 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
|
||||||
prompt = prompt.replace(`@${card}`, '').trim()
|
if (card) {
|
||||||
prompt = prompt.replace(`@${nickname}`, '').trim()
|
prompt = prompt.replace(`@${card}`, '').trim()
|
||||||
|
}
|
||||||
|
if (nickname) {
|
||||||
|
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')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue