fix: 命令精准匹配

This commit is contained in:
ikechan8370 2023-03-03 21:12:13 +08:00
parent 2787acb99c
commit e580928b9b
2 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@ export class chatgpt extends plugin {
fnc: 'chatgpt' fnc: 'chatgpt'
}, },
{ {
reg: '#chatgpt对话列表', reg: '^#chatgpt对话列表$',
fnc: 'getAllConversations', fnc: 'getAllConversations',
permission: 'master' permission: 'master'
}, },
@ -81,20 +81,20 @@ export class chatgpt extends plugin {
// fnc: 'help' // fnc: 'help'
// }, // },
{ {
reg: '#chatgpt图片模式', reg: '^#chatgpt图片模式$',
fnc: 'switch2Picture' fnc: 'switch2Picture'
}, },
{ {
reg: '#chatgpt文本模式', reg: '^#chatgpt文本模式$',
fnc: 'switch2Text' fnc: 'switch2Text'
}, },
{ {
reg: '#清空(chat)?队列', reg: '^#(chatgpt)清空(chat)?队列$',
fnc: 'emptyQueue', fnc: 'emptyQueue',
permission: 'master' permission: 'master'
}, },
{ {
reg: '#移出(chat)?队列首位', reg: '^#(chatgpt)移出(chat)?队列首位$',
fnc: 'removeQueueFirst', fnc: 'removeQueueFirst',
permission: 'master' permission: 'master'
}, },

View file

@ -129,7 +129,7 @@ export class help extends plugin {
priority: 500, priority: 500,
rule: [ rule: [
{ {
reg: '#(chatgpt|ChatGPT)(命令|帮助|菜单|help|说明|功能|指令|使用说明)', reg: '^#(chatgpt|ChatGPT)(命令|帮助|菜单|help|说明|功能|指令|使用说明)$',
fnc: 'help' fnc: 'help'
} }
] ]