mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: toLowerCase 报错
This commit is contained in:
parent
8f296fa39e
commit
c5976439cb
2 changed files with 7 additions and 5 deletions
10
apps/chat.js
10
apps/chat.js
|
|
@ -603,10 +603,12 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
let response = chatMessage?.text
|
||||
// 检索是否有屏蔽词
|
||||
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
||||
if (blockWord) {
|
||||
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
||||
return false
|
||||
if (response) {
|
||||
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
||||
if (blockWord) {
|
||||
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
let quotemessage = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue