fix: remove queue element only in non-bing mode

This commit is contained in:
ikechan8370 2023-02-15 15:35:20 +08:00 committed by GitHub
parent 00749fa310
commit 518a285ad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -339,13 +339,17 @@ export class chatgpt extends plugin {
this.reply(await makeForwardMsg(this.e, quotemessage))
}
}
// 移除队列首位,释放锁
await redis.lPop('CHATGPT:CHAT_QUEUE', 0)
if (use !== 'bing') {
// 移除队列首位,释放锁
await redis.lPop('CHATGPT:CHAT_QUEUE', 0)
}
} catch (e) {
logger.error(e)
// 异常了也要腾地方todo 大概率后面的也会异常,要不要一口气全杀了)
await redis.lPop('CHATGPT:CHAT_QUEUE', 0)
await this.reply(`与OpenAI通信异常请稍后重试${e}`, true, { recallMsg: e.isGroup ? 10 : 0 })
if (use !== 'bing') {
// 异常了也要腾地方todo 大概率后面的也会异常,要不要一口气全杀了)
await redis.lPop('CHATGPT:CHAT_QUEUE', 0)
}
await this.reply(`通信异常,请稍后重试:${e}`, true, { recallMsg: e.isGroup ? 10 : 0 })
}
}