Files
bl/modules/player/controller/robot/bindqq.go

27 lines
457 B
Go
Raw Normal View History

package robot
import (
"blazing/modules/base/service"
"strings"
zero "github.com/wdvxdr1123/ZeroBot"
)
func init() {
zero.OnCommand("绑定").
Handle(func(ctx *zero.Ctx) {
msgs := strings.Fields(ctx.Event.Message.String())
if len(msgs) > 2 {
err := service.NewBaseSysUserService().BindQQ(msgs[1], msgs[2], ctx.Event.Sender.ID)
if err != nil {
ctx.Send(err.Error())
} else {
ctx.Send("绑定成功")
}
}
})
}