From b007cef600bfb29f97eba86f7ec457f059070812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E6=9F=B3=E7=85=9C?= <101934327+fangliuyu@users.noreply.github.com> Date: Sat, 2 Sep 2023 11:20:54 +0800 Subject: [PATCH] Add files via upload --- plugin/mcfish/pack.go | 2 +- plugin/mcfish/store.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/mcfish/pack.go b/plugin/mcfish/pack.go index 0ec4f5cc53..2df31eb05d 100644 --- a/plugin/mcfish/pack.go +++ b/plugin/mcfish/pack.go @@ -267,7 +267,7 @@ func drawArticleInfoBlock(uid int64, articles []article, fontdata []byte) (image return nil, err } titleW, titleH := canvas.MeasureString("背包信息") - front := 50.0 + front := 45.0 err = canvas.ParseFontFace(fontdata, front) if err != nil { return nil, err diff --git a/plugin/mcfish/store.go b/plugin/mcfish/store.go index 0591a26fa6..8f246ab525 100644 --- a/plugin/mcfish/store.go +++ b/plugin/mcfish/store.go @@ -61,7 +61,7 @@ func init() { } ctx.SendChain(message.ImageBytes(pic)) }) - engine.OnRegex(`^出售(.+(竿|鱼)|河豚|鹦鹉螺|诱钓|海之眷顾|唱片|美西螈)\s*(\d*)$`, getdb, refreshFish).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) { + engine.OnRegex(`^出售(.+(竿|鱼)|河豚|鹦鹉螺|诱钓|海之眷顾|唱片|美西螈|三叉戟)\s*(\d*)$`, getdb, refreshFish).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) { uid := ctx.Event.UserID thingName := ctx.State["regex_matched"].([]string)[1] number, _ := strconv.Atoi(ctx.State["regex_matched"].([]string)[3]) @@ -269,7 +269,7 @@ func init() { } ctx.Send(message.ReplyWithMessage(ctx.Event.MessageID, message.Text("出售成功,你赚到了", pice*number))) }) - engine.OnRegex(`^购买(.+(竿|鱼)|河豚|鹦鹉螺|诱钓|海之眷顾|唱片|美西螈)\s*(\d*)$`, getdb, refreshFish).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) { + engine.OnRegex(`^购买(.+(竿|鱼)|河豚|鹦鹉螺|诱钓|海之眷顾|唱片|美西螈|三叉戟)\s*(\d*)$`, getdb, refreshFish).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) { uid := ctx.Event.UserID thingName := ctx.State["regex_matched"].([]string)[1] number, _ := strconv.Atoi(ctx.State["regex_matched"].([]string)[3])