From 41c499840f4939e9a314c3091ffc4b3750b8d255 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: Mon, 18 Apr 2022 22:59:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#197:=20=E7=8C=9C=E5=8D=95=E8=AF=8D?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=8C=87=E9=92=88=E6=8A=A5=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 +- go.sum | 4 ++-- plugin/wordle/wordle.go | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c247ff2d..52e68945 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/FloatTech/AnimeAPI v1.3.3-0.20220417132103-df55797131af github.com/FloatTech/sqlite v0.2.1 - github.com/FloatTech/zbputils v1.3.3-0.20220418082801-c565913994d3 + github.com/FloatTech/zbputils v1.3.3-0.20220418145633-c1d3c00da628 github.com/antchfx/htmlquery v1.2.4 github.com/corona10/goimagehash v1.0.3 github.com/fogleman/gg v1.3.0 diff --git a/go.sum b/go.sum index f6870c5d..91120f83 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/FloatTech/AnimeAPI v1.3.3-0.20220417132103-df55797131af h1:K7Cdrd1jgi github.com/FloatTech/AnimeAPI v1.3.3-0.20220417132103-df55797131af/go.mod h1:jUOit4oeiKOtRDy5ZLTJQa7aE0972R/KPF15b22Q3vY= github.com/FloatTech/sqlite v0.2.1 h1:9t6Me48XJJCIoPy4nLRvcdhcVKfT0c2lilp7SEKROG8= github.com/FloatTech/sqlite v0.2.1/go.mod h1:6NfHRzqOo9RWeMJEoAQVuo51Omd5LFNxCNQhMF02/9U= -github.com/FloatTech/zbputils v1.3.3-0.20220418082801-c565913994d3 h1:LqNSUEwgYfGBMfgdJdlCfu6l4rUEX2rKgD0q+64r/bQ= -github.com/FloatTech/zbputils v1.3.3-0.20220418082801-c565913994d3/go.mod h1:K2IVrhwmrVKZSHSHmNoO9JthN1As9RcnQplf+stQ5BY= +github.com/FloatTech/zbputils v1.3.3-0.20220418145633-c1d3c00da628 h1:NC7m06uyenwt4TRyCEkK5lFNId3TB5gKEeOYNQpYTBI= +github.com/FloatTech/zbputils v1.3.3-0.20220418145633-c1d3c00da628/go.mod h1:K2IVrhwmrVKZSHSHmNoO9JthN1As9RcnQplf+stQ5BY= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q= github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE= diff --git a/plugin/wordle/wordle.go b/plugin/wordle/wordle.go index 257e349c..5ed2267f 100644 --- a/plugin/wordle/wordle.go +++ b/plugin/wordle/wordle.go @@ -13,6 +13,7 @@ import ( "time" "github.com/FloatTech/AnimeAPI/tl" + "github.com/sirupsen/logrus" "github.com/FloatTech/zbputils/binary" "github.com/FloatTech/zbputils/control" @@ -77,7 +78,7 @@ func init() { }), )) - en.OnRegex(`(个人|团队)(五阶|六阶|七阶)?猜单词`, zero.OnlyGroup, ctxext.DoOnceOnSuccess( + en.OnRegex(`^(个人|团队)(五阶|六阶|七阶)?猜单词$`, zero.OnlyGroup, ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { var errcnt uint32 var wg sync.WaitGroup @@ -87,6 +88,7 @@ func init() { go func(i int) { defer wg.Done() dc, err := file.GetLazyData(fmt.Sprintf("%scet-4_%d.txt", en.DataFolder(), i), true, true) + logrus.Debugln("[wordle] get", fmt.Sprintf("%scet-4_%d.txt", en.DataFolder(), i)) if err != nil { atomic.AddUint32(&errcnt, 1) return @@ -102,6 +104,7 @@ func init() { go func(i int) { defer wg.Done() dd, err := file.GetLazyData(fmt.Sprintf("%sdict_%d.txt", en.DataFolder(), i), true, true) + logrus.Debugln("[wordle] get", fmt.Sprintf("%sdict_%d.txt", en.DataFolder(), i)) if err != nil { atomic.AddUint32(&errcnt, 1) return