mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
feat: 提供了更多的可选配置项,包括确认开关、暗示指令覆盖、触发方式、模型名称和屏蔽词等
This commit is contained in:
parent
35b7630d76
commit
233fc7417c
4 changed files with 97 additions and 20 deletions
32
apps/management.js
Normal file
32
apps/management.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import plugin from '../../../lib/plugins/plugin.js'
|
||||
|
||||
export class ChatgptManagement extends plugin {
|
||||
constructor (e) {
|
||||
super({
|
||||
name: 'ChatGPT-Plugin管理',
|
||||
dsc: 'ChatGPT-Plugin管理',
|
||||
event: 'message',
|
||||
priority: 500,
|
||||
rule: [
|
||||
{
|
||||
reg: '#chatgpt开启(问题)?确认',
|
||||
fnc: 'turnOnConfirm'
|
||||
},
|
||||
{
|
||||
reg: '#chatgpt关闭(问题)?确认',
|
||||
fnc: 'turnOffConfirm'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
async turnOnConfirm (e) {
|
||||
await redis.set('CHATGPT:CONFIRM', 'on')
|
||||
await this.reply('已开启消息确认', true)
|
||||
}
|
||||
|
||||
async turnOffConfirm (e) {
|
||||
await redis.set('CHATGPT:CONFIRM', 'off')
|
||||
await this.reply('已关闭消息确认', true)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue