Files
bl/login/internal/cmd/seerrobot.go
xinian 7a7fae05ea
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 新增战斗技能效果648-677
2026-03-30 12:11:44 +08:00

55 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package cmd
import (
"blazing/cool"
_ "blazing/modules/config/controller/robot"
_ "blazing/modules/player/controller/robot"
"time"
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/antiabuse" // 违禁词
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chat" // 基础词库
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chatcount" // 聊天时长统计
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/airecord" // 群应用AI声聊
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/score"
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/sleepmanage" // 统计睡眠时间
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/atri" // ATRI词库
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/choose" // 选择困难症帮手
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/drawlots" // 多功能抽签
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/pig" // 来份猪猪
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/manager" // 群管
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/aifalse" // 服务器监控
// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/poker" // 抽扑克
//_ "github.com/FloatTech/zbputils/job" // 定时指令触发器
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/driver"
)
//机器人 token b7a33db00ede
func startrobot() {
zero.OnMessage(func(ctx *zero.Ctx) bool {
return cool.Filter.IsSensitive(ctx.Event.Message.String()) && ctx.Event.GroupID != 0
}).Handle(func(ctx *zero.Ctx) {
ctx.SetGroupBan(ctx.Event.GroupID, ctx.Event.Sender.ID, int64(10*time.Minute))
})
zero.RunAndBlock(&zero.Config{
NickName: []string{"bot"},
CommandPrefix: "/",
SuperUsers: []int64{123456},
Driver: []zero.Driver{
// 正向 WS
driver.NewWebSocketClient("ws://43.248.3.21:3001", "ORQ5~lofO5VDwbG7"),
// 反向 WS
// driver.NewWebSocketServer(16, "ws://127.0.0.1:6701", ""),
// // HTTP
// driver.NewHTTPClient("http://127.0.0.1:6701", "", "http://127.0.0.1:6700", ""),
},
}, nil)
}