mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
优化atri.go匹配逻辑
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user