feat: 添加扭蛋物品和扭蛋精灵查询指令
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
24
modules/config/controller/robot/eggpet.go
Normal file
24
modules/config/controller/robot/eggpet.go
Normal 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"))
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user