MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / listPickups

Function listPickups

plugin/fgopickup/handler.go:13–27  ·  view source on GitHub ↗

列出所有的卡池

(ctx *zero.Ctx)

Source from the content-addressed store, hash-verified

11
12// 列出所有的卡池
13func listPickups(ctx *zero.Ctx) {
14 service := service{}
15 pickups, err := service.getPickups()
16
17 if err != nil {
18 ctx.SendChain(message.Text("ERROR: ", err, " 解释: 查询出错!"))
19 return
20 }
21
22 msg := make(message.Message, len(*pickups))
23 for i, pickup := range *pickups {
24 msg[i] = ctxext.FakeSenderForwardNode(ctx, getMsgOfSinglePickup(pickup)...)
25 }
26 ctx.Send(msg)
27}
28
29// 以卡池id获取某一个卡池的详情
30func pickupDetail(ctx *zero.Ctx) {

Callers

nothing calls this directly

Calls 2

getPickupsMethod · 0.95
getMsgOfSinglePickupFunction · 0.85

Tested by

no test coverage detected