@@ -28,7 +28,7 @@ func init() {
28
28
PrivateDataFolder : "airecord" ,
29
29
})
30
30
31
- en .OnPrefix ("设置AI语音群号" , zero .SuperUserPermission ).SetBlock (true ).
31
+ en .OnPrefix ("设置AI语音群号" , zero .OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
32
32
Handle (func (ctx * zero.Ctx ) {
33
33
u := strings .TrimSpace (ctx .State ["args" ].(string ))
34
34
num , err := strconv .ParseInt (u , 10 , 64 )
@@ -43,7 +43,7 @@ func init() {
43
43
}
44
44
ctx .SendChain (message .Text ("设置AI语音群号为" , num ))
45
45
})
46
- en .OnFullMatch ("设置AI语音模型" , zero .SuperUserPermission ).SetBlock (true ).
46
+ en .OnFullMatch ("设置AI语音模型" , zero .OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
47
47
Handle (func (ctx * zero.Ctx ) {
48
48
next := zero .NewFutureEvent ("message" , 999 , false , ctx .CheckSession ())
49
49
recv , cancel := next .Repeat ()
@@ -113,12 +113,12 @@ func init() {
113
113
}
114
114
}
115
115
})
116
- en .OnFullMatch ("查看AI语音配置" ).SetBlock (true ).
116
+ en .OnFullMatch ("查看AI语音配置" , zero . OnlyPrivate , zero . SuperUserPermission ).SetBlock (true ).
117
117
Handle (func (ctx * zero.Ctx ) {
118
118
recCfg := airecord .RecCfg
119
119
ctx .SendChain (message .Text (airecord .PrintRecordConfig (recCfg )))
120
120
})
121
- en .OnPrefix ("发送AI语音" ).SetBlock (true ).
121
+ en .OnPrefix ("发送AI语音" , zero . UserOrGrpAdmin ).SetBlock (true ).
122
122
Handle (func (ctx * zero.Ctx ) {
123
123
u := strings .TrimSpace (ctx .State ["args" ].(string ))
124
124
recCfg := airecord .RecCfg
0 commit comments