Skip to content

Commit a2dfc54

Browse files
committed
🐛 fix: b14 decode
1 parent 7ded2fe commit a2dfc54

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module github.com/FloatTech/ZeroBot-Plugin
33
go 1.18
44

55
require (
6-
github.com/FloatTech/AnimeAPI v1.4.1-0.20220610072926-7b30ff4586ec
6+
github.com/FloatTech/AnimeAPI v1.4.1-0.20220613042537-0adf8c5616ec
77
github.com/FloatTech/sqlite v0.3.2
88
github.com/FloatTech/zbpctrl v1.4.1-0.20220610074608-425160596f27
9-
github.com/FloatTech/zbputils v1.4.1-0.20220610074642-09004f278b03
9+
github.com/FloatTech/zbputils v1.4.1-0.20220613042833-33e22060e8d9
1010
github.com/antchfx/htmlquery v1.2.5
1111
github.com/corona10/goimagehash v1.0.3
1212
github.com/fogleman/gg v1.3.0
1313
github.com/fumiama/cron v1.3.0
14-
github.com/fumiama/go-base16384 v1.5.2
14+
github.com/fumiama/go-base16384 v1.5.3
1515
github.com/fumiama/go-registry v0.1.6
1616
github.com/fumiama/gofastTEA v0.0.10
1717
github.com/fumiama/gotracemoe v0.0.3

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1
88
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
99
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
1010
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
11-
github.com/FloatTech/AnimeAPI v1.4.1-0.20220610072926-7b30ff4586ec h1:10h8e85tJ9v+ZQ+ShFQW4L2KP1x88+ntaZdVt9XHkwE=
12-
github.com/FloatTech/AnimeAPI v1.4.1-0.20220610072926-7b30ff4586ec/go.mod h1:z7gyiirY3EMH4QHfymYl21KNanSB2Ni4jwtFp9e/raA=
11+
github.com/FloatTech/AnimeAPI v1.4.1-0.20220613042537-0adf8c5616ec h1:Hl/BxaQoQFEJUIGmdhR0NyBvZChb7qkfCrF916bNxnI=
12+
github.com/FloatTech/AnimeAPI v1.4.1-0.20220613042537-0adf8c5616ec/go.mod h1:MrCZ7P6WvF0JWHMeedAx6fVm5BP1s6/RUy0r0Jvqrds=
1313
github.com/FloatTech/sqlite v0.3.2 h1:iTg2ZKnzjjZAdlSN3hXmpCBn15odc4Ud484OoM3yXGA=
1414
github.com/FloatTech/sqlite v0.3.2/go.mod h1:VFtLofV5qxw5eBneZRbWwD451SLSm50o9J3J43iB1iw=
1515
github.com/FloatTech/zbpctrl v1.4.1-0.20220610074608-425160596f27 h1:C+D30vpxfgbJetTFXWAHzuU8GydbFb/A8Kv6E3PdRS4=
1616
github.com/FloatTech/zbpctrl v1.4.1-0.20220610074608-425160596f27/go.mod h1:5FDkrlVaQCxUfeqH7XJPTfej0q+y9fzImhvZI4ofu9Y=
17-
github.com/FloatTech/zbputils v1.4.1-0.20220610074642-09004f278b03 h1:OeVhJvlf3gMac+B5CMOQoJOM3I/uz/wCMgX6o6OgtFE=
18-
github.com/FloatTech/zbputils v1.4.1-0.20220610074642-09004f278b03/go.mod h1:6Y34s+MbssTT4AWBKfJCMifFyFhtB3RGC1qo+8EVGZ4=
17+
github.com/FloatTech/zbputils v1.4.1-0.20220613042833-33e22060e8d9 h1:IeUs08sUqdR/g8DfxPNTSBfsE1g0OtmffLNgKzbrVZ4=
18+
github.com/FloatTech/zbputils v1.4.1-0.20220613042833-33e22060e8d9/go.mod h1:A9AeVHZsv5chyw8p4fDI0cHnEOfMpmsTLoLWqUT7TO4=
1919
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
2020
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q=
2121
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE=
@@ -57,8 +57,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo
5757
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
5858
github.com/fumiama/cron v1.3.0 h1:ZWlwuexF+HQHl3cYytEE5HNwD99q+3vNZF1GrEiXCFo=
5959
github.com/fumiama/cron v1.3.0/go.mod h1:bz5Izvgi/xEUI8tlBN8BI2jr9Moo8N4or0KV8xXuPDY=
60-
github.com/fumiama/go-base16384 v1.5.2 h1:cbxXTcDH92PNgG7bEBwiCEoWb5O+nwZKxKOG94ilFo8=
61-
github.com/fumiama/go-base16384 v1.5.2/go.mod h1:OEn+947GV5gsbTAnyuUW/SrfxJYUdYupSIQXOuGOcXM=
60+
github.com/fumiama/go-base16384 v1.5.3 h1:IUZUlm2ajJB1nEJzauP6yD5IeJoVHyBEkzKJf9O82zs=
61+
github.com/fumiama/go-base16384 v1.5.3/go.mod h1:OEn+947GV5gsbTAnyuUW/SrfxJYUdYupSIQXOuGOcXM=
6262
github.com/fumiama/go-registry v0.1.6 h1:Ee/tXCCIR/xt8celhbbw0W/xDMdhAXLwy2YFBB/LWFk=
6363
github.com/fumiama/go-registry v0.1.6/go.mod h1:dIUVbiOgfk9oZcsgwDvNLC72i+ctibVukSXR/9bLviI=
6464
github.com/fumiama/gofastTEA v0.0.10 h1:JJJ+brWD4kie+mmK2TkspDXKzqq0IjXm89aGYfoGhhQ=

plugin/ai_reply/ai_tts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func init() {
8888
}
8989
}
9090
})
91-
engine.OnRegex(`^设置语音模式(.*)$`, ctxext.FirstValueInList(t)).SetBlock(true).
91+
engine.OnRegex(`^设置语音模式(.*)$`, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, t)).SetBlock(true).
9292
Handle(func(ctx *zero.Ctx) {
9393
param := ctx.State["regex_matched"].([]string)[1]
9494
err := t.setSoundMode(ctx, param)
@@ -98,7 +98,7 @@ func init() {
9898
}
9999
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("设置成功,当前模式为", param))
100100
})
101-
engine.OnRegex(`^设置默认语音模式(.*)$`, ctxext.FirstValueInList(t)).SetBlock(true).
101+
engine.OnRegex(`^设置默认语音模式(.*)$`, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, t)).SetBlock(true).
102102
Handle(func(ctx *zero.Ctx) {
103103
param := ctx.State["regex_matched"].([]string)[1]
104104
t.setDefaultSoundMode(param)

plugin/fortune/fortune.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func init() {
139139
}
140140

141141
// 随机获取签文
142-
randtextindex := ctxext.RandSenderPerDayN(ctx, len(omikujis))
142+
randtextindex := ctxext.RandSenderPerDayN(ctx.Event.UserID, len(omikujis))
143143
title, text := omikujis[randtextindex]["title"], omikujis[randtextindex]["content"]
144144
digest := md5.Sum(helper.StringToBytes(zipfile + strconv.Itoa(index) + title + text))
145145
cachefile := cache + hex.EncodeToString(digest[:])
@@ -171,7 +171,7 @@ func randimage(path string, ctx *zero.Ctx) (im image.Image, index int, err error
171171
}
172172
defer reader.Close()
173173

174-
file := reader.File[ctxext.RandSenderPerDayN(ctx, len(reader.File))]
174+
file := reader.File[ctxext.RandSenderPerDayN(ctx.Event.UserID, len(reader.File))]
175175
f, err := file.Open()
176176
if err != nil {
177177
return

plugin/nativesetu/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func init() {
4242
}
4343
}
4444

45-
engine.OnRegex(`^本地(.*)$`, ctxext.FirstValueInList(ns)).SetBlock(true).
45+
engine.OnRegex(`^本地(.*)$`, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, ns)).SetBlock(true).
4646
Handle(func(ctx *zero.Ctx) {
4747
imgtype := ctx.State["regex_matched"].([]string)[1]
4848
sc := new(setuclass)
@@ -63,7 +63,7 @@ func init() {
6363
ctx.SendChain(message.Text(imgtype, ": ", sc.Name, "\n"), message.Image(p))
6464
}
6565
})
66-
engine.OnRegex(`^刷新本地(.*)$`, ctxext.FirstValueInList(ns), zero.SuperUserPermission).SetBlock(true).
66+
engine.OnRegex(`^刷新本地(.*)$`, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, ns), zero.SuperUserPermission).SetBlock(true).
6767
Handle(func(ctx *zero.Ctx) {
6868
imgtype := ctx.State["regex_matched"].([]string)[1]
6969
err := ns.scanclass(os.DirFS(setupath), imgtype, imgtype)

plugin/omikuji/sensou.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func init() { // 插件主体
2828

2929
engine.OnFullMatchGroup([]string{"求签", "占卜"}).SetBlock(true).
3030
Handle(func(ctx *zero.Ctx) {
31-
i := ctxext.RandSenderPerDayN(ctx, 100) + 1
31+
i := ctxext.RandSenderPerDayN(ctx.Event.UserID, 100) + 1
3232
ctx.SendChain(
3333
message.At(ctx.Event.UserID),
3434
message.Image(fmt.Sprintf(bed, i, 0)),
@@ -65,7 +65,7 @@ func init() { // 插件主体
6565
Handle(func(ctx *zero.Ctx) {
6666
kujiBytes, err := text.RenderToBase64(
6767
getKujiByBango(
68-
uint8(ctxext.RandSenderPerDayN(ctx, 100)+1),
68+
uint8(ctxext.RandSenderPerDayN(ctx.Event.UserID, 100)+1),
6969
),
7070
text.FontFile, 400, 20,
7171
)

plugin/setutime/setu_geter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func init() { // 插件主体
7878
return true
7979
})
8080

81-
engine.OnRegex(`^来份(.+)$`, getdb, ctxext.FirstValueInList(pool)).SetBlock(true).Limit(ctxext.LimitByUser).
81+
engine.OnRegex(`^来份(.+)$`, getdb, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, pool)).SetBlock(true).Limit(ctxext.LimitByUser).
8282
Handle(func(ctx *zero.Ctx) {
8383
var imgtype = ctx.State["regex_matched"].([]string)[1]
8484
// 补充池子
@@ -112,7 +112,7 @@ func init() { // 插件主体
112112
ctx.SendChain(message.Text("成功向分类", imgtype, "添加图片", id))
113113
})
114114

115-
engine.OnRegex(`^删除\s*([^0-9\s]+)\s*(\d+)$`, getdb, ctxext.FirstValueInList(pool), zero.SuperUserPermission).SetBlock(true).
115+
engine.OnRegex(`^删除\s*([^0-9\s]+)\s*(\d+)$`, getdb, ctxext.ValueInList(func(ctx *zero.Ctx) string { return ctx.State["regex_matched"].([]string)[1] }, pool), zero.SuperUserPermission).SetBlock(true).
116116
Handle(func(ctx *zero.Ctx) {
117117
var (
118118
imgtype = ctx.State["regex_matched"].([]string)[1]

0 commit comments

Comments
 (0)