-
Notifications
You must be signed in to change notification settings - Fork 45
/
main.go
44 lines (37 loc) · 1.15 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Package fgopickup FGO卡池相关插件
package fgopickup
import (
ctrl "github.com/FloatTech/zbpctrl"
"github.com/FloatTech/zbputils/control"
"github.com/FloatTech/zbputils/ctxext"
zero "github.com/wdvxdr1123/ZeroBot"
)
func init() {
engine := control.Register("fgopickup", &ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "Fate/Grand Order",
Help: "- fgo未来视 (查询未来卡池)\n" +
"- fgo卡池[id] (以卡池id查询卡池详情)\n" +
"- fgo从者[page] (分页查询从者)\n" +
"- fgo从者卡池[从者id]",
Banner: "https://wx2.sinaimg.cn/large/0083LFbYgy1hcfkreklmbj31e012w7i5.jpg",
PrivateDataFolder: "fgopickup",
})
_ = initialize(engine.DataFolder() + "fgopickup.db")
engine.OnFullMatch(`fgo未来视`).
SetBlock(true).
Limit(ctxext.LimitByGroup).
Handle(listPickups)
engine.OnPrefix(`fgo卡池`).
SetBlock(true).
Limit(ctxext.LimitByGroup).
Handle(pickupDetail)
engine.OnPrefix(`fgo从者`).
SetBlock(true).
Limit(ctxext.LimitByGroup).
Handle(getServantList)
engine.OnPrefix(`fgo从者卡池`).
SetBlock(true).
Limit(ctxext.LimitByGroup).
Handle(getServantPickups)
}