@@ -28,7 +28,7 @@ func init() {
2828 PrivateDataFolder : "airecord" ,
2929 })
3030
31- en .OnPrefix ("设置AI语音群号" , zero .SuperUserPermission ).SetBlock (true ).
31+ en .OnPrefix ("设置AI语音群号" , zero .OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
3232 Handle (func (ctx * zero.Ctx ) {
3333 u := strings .TrimSpace (ctx .State ["args" ].(string ))
3434 num , err := strconv .ParseInt (u , 10 , 64 )
@@ -43,7 +43,7 @@ func init() {
4343 }
4444 ctx .SendChain (message .Text ("设置AI语音群号为" , num ))
4545 })
46- en .OnFullMatch ("设置AI语音模型" , zero .SuperUserPermission ).SetBlock (true ).
46+ en .OnFullMatch ("设置AI语音模型" , zero .OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
4747 Handle (func (ctx * zero.Ctx ) {
4848 next := zero .NewFutureEvent ("message" , 999 , false , ctx .CheckSession ())
4949 recv , cancel := next .Repeat ()
@@ -113,12 +113,12 @@ func init() {
113113 }
114114 }
115115 })
116- en .OnFullMatch ("查看AI语音配置" ).SetBlock (true ).
116+ en .OnFullMatch ("查看AI语音配置" , zero . OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
117117 Handle (func (ctx * zero.Ctx ) {
118118 recCfg := airecord .RecCfg
119119 ctx .SendChain (message .Text (airecord .PrintRecordConfig (recCfg )))
120120 })
121- en .OnPrefix ("发送AI语音" ).SetBlock (true ).
121+ en .OnPrefix ("发送AI语音" , zero . UserOrGrpAdmin ).SetBlock (true ).
122122 Handle (func (ctx * zero.Ctx ) {
123123 u := strings .TrimSpace (ctx .State ["args" ].(string ))
124124 recCfg := airecord .RecCfg
0 commit comments