mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
fix: fix bugs
This commit is contained in:
parent
c5976439cb
commit
dfd1ce469d
1 changed files with 10 additions and 7 deletions
|
|
@ -602,14 +602,17 @@ export class chatgpt extends plugin {
|
||||||
await redis.set(`CHATGPT:CONVERSATIONS:${e.sender.user_id}`, JSON.stringify(previousConversation), Config.conversationPreserveTime > 0 ? { EX: Config.conversationPreserveTime } : {})
|
await redis.set(`CHATGPT:CONVERSATIONS:${e.sender.user_id}`, JSON.stringify(previousConversation), Config.conversationPreserveTime > 0 ? { EX: Config.conversationPreserveTime } : {})
|
||||||
}
|
}
|
||||||
let response = chatMessage?.text
|
let response = chatMessage?.text
|
||||||
|
if (!response) {
|
||||||
|
await e.reply('没有任何回复', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
// 检索是否有屏蔽词
|
// 检索是否有屏蔽词
|
||||||
if (response) {
|
|
||||||
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
||||||
if (blockWord) {
|
if (blockWord) {
|
||||||
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let quotemessage = []
|
let quotemessage = []
|
||||||
if (chatMessage?.quote) {
|
if (chatMessage?.quote) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue