@@ -232,10 +232,10 @@ func init() {
232232 Handle (newextrasetstr (& cfg .ModelName ))
233233 en .OnPrefix ("设置AI聊天系统提示词" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
234234 Handle (newextrasetstr (& cfg .SystemP ))
235- en .OnFullMatch ("查看AI聊天系统提示词" , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).Handle (func (ctx * zero.Ctx ) {
235+ en .OnFullMatch ("查看AI聊天系统提示词" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).Handle (func (ctx * zero.Ctx ) {
236236 ctx .SendChain (message .Text (cfg .SystemP ))
237237 })
238- en .OnFullMatch ("重置AI聊天系统提示词" , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).Handle (func (ctx * zero.Ctx ) {
238+ en .OnFullMatch ("重置AI聊天系统提示词" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).Handle (func (ctx * zero.Ctx ) {
239239 c , ok := ctx .State ["manager" ].(* ctrl.Control [* zero.Ctx ])
240240 if ! ok {
241241 ctx .SendChain (message .Text ("ERROR: no such plugin" ))
@@ -249,10 +249,10 @@ func init() {
249249 }
250250 ctx .SendChain (message .Text ("成功" ))
251251 })
252- en .OnPrefix ("设置AI聊天分隔符" , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
252+ en .OnPrefix ("设置AI聊天分隔符" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
253253 Handle (newextrasetstr (& cfg .Separator ))
254- en .OnRegex ("^设置AI聊天(不)?响应AT$" , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
254+ en .OnRegex ("^设置AI聊天(不)?响应AT$" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
255255 Handle (newextrasetbool (& cfg .NoReplyAT ))
256- en .OnRegex ("^设置AI聊天(不)?支持系统提示词$" , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
256+ en .OnRegex ("^设置AI聊天(不)?支持系统提示词$" , ensureconfig , zero .OnlyPrivate , zero .SuperUserPermission ).SetBlock (true ).
257257 Handle (newextrasetbool (& cfg .NoSystemP ))
258258}
0 commit comments