feat: 添加扭蛋物品和扭蛋精灵查询指令
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-23 23:33:25 +08:00
committed by cnb
parent 8ee19aa66f
commit 90d03b3a32
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package robot
import (
"blazing/common/data/xmlres"
"blazing/modules/config/service"
"strings"
zero "github.com/wdvxdr1123/ZeroBot"
)
func init() {
zero.OnCommand("扭蛋精灵").
Handle(func(ctx *zero.Ctx) {
var cdks []string
for _, v := range service.NewPetRewardService().AllEgg() {
cdks = append(cdks, xmlres.PetMAP[int(v.MonID)].DefName)
}
ctx.Send(strings.Join(cdks, "\n"))
})
}