mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
解决非QQ平台AI回复后依然发送异常图片 (#491)
This commit is contained in:
parent
16a8c64b56
commit
b7ac3bff30
1 changed files with 7 additions and 3 deletions
|
|
@ -81,8 +81,12 @@ export async function tryTimes (promiseFn, maxTries = 10) {
|
|||
export async function makeForwardMsg (e, msg = [], dec = '') {
|
||||
let nickname = Bot.nickname
|
||||
if (e.isGroup) {
|
||||
let info = await Bot.getGroupMemberInfo(e.group_id, Bot.uin)
|
||||
nickname = info.card || info.nickname
|
||||
try {
|
||||
let info = await Bot.getGroupMemberInfo(e.group_id, Bot.uin)
|
||||
nickname = info.card || info.nickname
|
||||
} catch (err) {
|
||||
console.error(`Failed to get group member info: ${err}`)
|
||||
}
|
||||
}
|
||||
let userInfo = {
|
||||
user_id: Bot.uin,
|
||||
|
|
@ -801,4 +805,4 @@ export function getMaxModelTokens (model = 'gpt-3.5-turbo') {
|
|||
return 16000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue