From 4776da458486da14cb11e81f8d80224354f87f01 Mon Sep 17 00:00:00 2001 From: fumiama Date: Thu, 26 Aug 2021 00:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20shindan=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_shindan/shindan.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin_shindan/shindan.go b/plugin_shindan/shindan.go index 51bcdbb3..5eff7428 100644 --- a/plugin_shindan/shindan.go +++ b/plugin_shindan/shindan.go @@ -5,11 +5,10 @@ import ( "strconv" "time" + "github.com/FloatTech/AnimeAPI/shindanmaker" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/extension/rate" "github.com/wdvxdr1123/ZeroBot/message" - - "github.com/FloatTech/AnimeAPI/shindanmaker" ) var ( @@ -25,7 +24,7 @@ func init() { } // shindanmaker 处理函数 -var handle = func(ctx *zero.Ctx) { +func handle(ctx *zero.Ctx) { if !limit.Load(ctx.Event.UserID).Acquire() { ctx.SendChain(message.Text("请稍后重试0x0...")) return @@ -43,11 +42,11 @@ var handle = func(ctx *zero.Ctx) { if err != nil { ctx.SendChain(message.Text("ERROR: ", err)) } - ctx.SendChain(message.Text(text)) + ctx.Send(text) } // 传入 shindanmaker id -var number = func(id int64) func(ctx *zero.Ctx) bool { +func number(id int64) func(ctx *zero.Ctx) bool { return func(ctx *zero.Ctx) bool { ctx.State["id"] = id return true