Skip to content

Commit 0ec6480

Browse files
committed
🎨 token消耗大,添加admin权限
1 parent c72a5d2 commit 0ec6480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/aichat/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func init() {
317317
})
318318

319319
// 添加群聊总结功能
320-
en.OnRegex(`^群聊总结\s?(\d*)$`, ensureconfig, zero.OnlyGroup).SetBlock(true).Limit(limit.LimitByGroup).Handle(func(ctx *zero.Ctx) {
320+
en.OnRegex(`^群聊总结\s?(\d*)$`, ensureconfig, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).Limit(limit.LimitByGroup).Handle(func(ctx *zero.Ctx) {
321321
ctx.SendChain(message.Text("少女思考中..."))
322322
p, _ := strconv.ParseInt(ctx.State["regex_matched"].([]string)[1], 10, 64)
323323
if p > 1000 {

0 commit comments

Comments
 (0)