mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 闭嘴功能
This commit is contained in:
parent
ce6559b644
commit
156a669ec6
5 changed files with 208 additions and 3 deletions
|
|
@ -412,6 +412,11 @@ export class chatgpt extends plugin {
|
|||
return false
|
||||
}
|
||||
}
|
||||
let groupId = e.isGroup ? e.group.group_id : ''
|
||||
if (await redis.get('CHATGPT:SHUT_UP:ALL') || await redis.get(`CHATGPT:SHUT_UP:${groupId}`)) {
|
||||
logger.info('chatgpt闭嘴中,不予理会')
|
||||
return false
|
||||
}
|
||||
let userSetting = await redis.get(`CHATGPT:USER:${e.sender.user_id}`)
|
||||
if (userSetting) {
|
||||
userSetting = JSON.parse(userSetting)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue