From c2b7ae31cc820049b23312ebecc9787747d404d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:42:50 +0900 Subject: [PATCH] chore: update deps --- go.mod | 2 +- go.sum | 4 ++-- plugin/manager/slow.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index d9ee248fe6..220067ff52 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/fumiama/go-registry v0.2.7 github.com/fumiama/gotracemoe v0.0.3 github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565 - github.com/fumiama/slowdo v0.0.0-20241001071333-19864b14750a + github.com/fumiama/slowdo v0.0.0-20241001074058-27c4fe5259a4 github.com/fumiama/terasu v0.0.0-20240507144117-547a591149c0 github.com/fumiama/unibase2n v0.0.0-20240530074540-ec743fd5a6d6 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 diff --git a/go.sum b/go.sum index 584c3acedc..27f01515c6 100644 --- a/go.sum +++ b/go.sum @@ -76,8 +76,8 @@ github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565 h1:sQuR2+N5HurnvsZhi github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565/go.mod h1:UUEvyLTJ7yoOA/viKG4wEis4ERydM7+Ny6gZUWgkS80= github.com/fumiama/libc v0.0.0-20240530081950-6f6d8586b5c5 h1:jDxsIupsT84A6WHcs6kWbst+KqrRQ8/o0VyoFMnbBOA= github.com/fumiama/libc v0.0.0-20240530081950-6f6d8586b5c5/go.mod h1:15P6ublJ9FJR8YQCGy8DeQ2Uwur7iW9Hserr/T3OFZE= -github.com/fumiama/slowdo v0.0.0-20241001071333-19864b14750a h1:2yxgU8cN4qmziVLOktD4us5RdZxlYXRtCfigU0Xx9d4= -github.com/fumiama/slowdo v0.0.0-20241001071333-19864b14750a/go.mod h1:iZf1H/Jcw5gjOOFb4C5nlweJtViWc7uwUxRCe14pbYk= +github.com/fumiama/slowdo v0.0.0-20241001074058-27c4fe5259a4 h1:zN9e09TYKXI1mNkuS6YbH+Sn+4k5tBir+ovhZZcRYAs= +github.com/fumiama/slowdo v0.0.0-20241001074058-27c4fe5259a4/go.mod h1:iZf1H/Jcw5gjOOFb4C5nlweJtViWc7uwUxRCe14pbYk= github.com/fumiama/sqlite3 v1.29.10-simp h1:c5y3uKyU0q9t0/SyfynzYyuslQ5zP+5CD8e0yYY554A= github.com/fumiama/sqlite3 v1.29.10-simp/go.mod h1:ItX2a1OVGgNsFh6Dv60JQvGfJfTPHPVpV6DF59akYOA= github.com/fumiama/terasu v0.0.0-20240507144117-547a591149c0 h1:So/3Bg/m2ZcUvqCzzEjjkjHBjcvnV3AN5tCxwsdMwYU= diff --git a/plugin/manager/slow.go b/plugin/manager/slow.go index ce04c57215..b21bfbc89d 100644 --- a/plugin/manager/slow.go +++ b/plugin/manager/slow.go @@ -9,7 +9,7 @@ import ( "github.com/wdvxdr1123/ZeroBot/message" ) -var slowsenders = syncx.Map[int64, *syncx.Lazy[*slowdo.Job[message.MessageSegment, *zero.Ctx]]]{} +var slowsenders = syncx.Map[int64, *syncx.Lazy[*slowdo.Job[*zero.Ctx, message.MessageSegment]]]{} func collectsend(ctx *zero.Ctx, msgs ...message.MessageSegment) { id := ctx.Event.GroupID @@ -17,8 +17,8 @@ func collectsend(ctx *zero.Ctx, msgs ...message.MessageSegment) { // only support group return } - lazy, _ := slowsenders.LoadOrStore(id, &syncx.Lazy[*slowdo.Job[message.MessageSegment, *zero.Ctx]]{ - Init: func() *slowdo.Job[message.MessageSegment, *zero.Ctx] { + lazy, _ := slowsenders.LoadOrStore(id, &syncx.Lazy[*slowdo.Job[*zero.Ctx, message.MessageSegment]]{ + Init: func() *slowdo.Job[*zero.Ctx, message.MessageSegment] { x, err := slowdo.NewJob(time.Second*5, ctx, func(ctx *zero.Ctx, msg []message.MessageSegment) { m := make(message.Message, len(msg)) for i, item := range msg {