mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-10 09:10:25 +00:00
Compare commits
3 Commits
v1.3.3-bet
...
v1.3.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41c499840f | ||
|
|
f5cef170f0 | ||
|
|
d7922a7c9b |
2
go.mod
2
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.20220417132003-a50e9afdc0c6
|
||||
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
|
||||
|
||||
4
go.sum
4
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.20220417132003-a50e9afdc0c6 h1:O1qoV79PMehjyfruFOWOctFLFlEWLVkEypxVyQZnVx0=
|
||||
github.com/FloatTech/zbputils v1.3.3-0.20220417132003-a50e9afdc0c6/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=
|
||||
|
||||
@@ -82,7 +82,7 @@ func init() {
|
||||
messageSeq := h.Get("messages.0.message_seq").Int()
|
||||
for i := 0; i < int(p/20) && messageSeq != 0; i++ {
|
||||
if i != 0 {
|
||||
h = ctx.CallAction("get_group_msg_history", zero.Params{"group_id": ctx.Event.GroupID, "message_seq": messageSeq}).Data
|
||||
h = ctx.CallAction("get_group_msg_history", zero.Params{"group_id": gid, "message_seq": messageSeq}).Data
|
||||
}
|
||||
for _, v := range h.Get("messages.#.message").Array() {
|
||||
tex := strings.TrimSpace(message.ParseMessageFromString(v.Str).ExtractPlainText())
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user