feat(aichat): add handling resp

This commit is contained in:
源文雨
2025-09-26 00:13:04 +08:00
parent 7bd1653cb5
commit 43cc90b724
11 changed files with 42 additions and 128 deletions

View File

@@ -11,7 +11,6 @@ import (
sql "github.com/FloatTech/sqlite"
ctrl "github.com/FloatTech/zbpctrl"
"github.com/FloatTech/zbputils/control"
"github.com/wdvxdr1123/ZeroBot/extension/single"
"github.com/FloatTech/AnimeAPI/wallet"
"github.com/FloatTech/floatbox/math"
@@ -45,16 +44,7 @@ func init() {
"7. 每日可打劫或被打劫一次\n" +
"8. 打劫失败不计入次数\n",
PrivateDataFolder: "robbery",
}).ApplySingle(single.New(
single.WithKeyFn(func(ctx *zero.Ctx) int64 { return ctx.Event.GroupID }),
single.WithPostFn[int64](func(ctx *zero.Ctx) {
ctx.Send(
message.ReplyWithMessage(ctx.Event.MessageID,
message.Text("别着急,警察局门口排长队了!"),
),
)
}),
))
}).ApplySingle(ctxext.NewGroupSingle("别着急,警察局门口排长队了!"))
getdb := fcext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
police.db = sql.New(engine.DataFolder() + "robbery.db")
err := police.db.Open(time.Hour)