优化atri.go匹配逻辑

This commit is contained in:
haibaraguo
2021-09-05 12:04:18 +08:00
parent f790165358
commit 9665f6cb3f
4 changed files with 7 additions and 79524 deletions

View File

@@ -13,14 +13,7 @@ import (
func init() {
//所有群添加定时早安
//zero.RangeBot(func(id int64, ctx *zero.Ctx) bool { // test the range bot function
// result := ctx.GetGroupList()
// log.Println(result)
// for _, v := range result.Array() {
// Daily(v.Get("group_id").Int())
// }
// return true
//})
zero.OnCommand("daily").SetBlock(false).FirstPriority().Handle(func(ctx *zero.Ctx) {
log.Println(ctx.GetGroupList())
result := ctx.GetGroupList()

View File

@@ -75,11 +75,11 @@ func init() { // 插件主体
})
zero.OnFullMatch("启自动回复", zero.SuperUserPermission).SetBlock(true).SetPriority(prio).
zero.OnFullMatch("启自动回复", zero.SuperUserPermission).SetBlock(true).SetPriority(prio).
Handle(func(ctx *zero.Ctx) {
enable = true
ctx.SendChain(message.Text("自动回复启"))
ctx.SendChain(message.Text("自动回复启"))
})
zero.OnFullMatch("关闭自动回复", zero.SuperUserPermission).SetBlock(true).SetPriority(prio).