mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
加速word count
This commit is contained in:
parent
136e6bddf4
commit
592c306aa0
@ -96,11 +96,11 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
messageMap := make(map[string]int, 256)
|
messageMap := make(map[string]int, 256)
|
||||||
h := ctx.GetLatestGroupMessageHistory(gid)
|
msghists := make(chan *gjson.Result, 256)
|
||||||
messageSeq := h.Get("messages.0.message_seq").Int()
|
|
||||||
msghists := make(chan *gjson.Result, 64)
|
|
||||||
msghists <- &h
|
|
||||||
go func() {
|
go func() {
|
||||||
|
h := ctx.GetLatestGroupMessageHistory(gid)
|
||||||
|
messageSeq := h.Get("messages.0.message_seq").Int()
|
||||||
|
msghists <- &h
|
||||||
for i := 1; i < int(p/20) && messageSeq != 0; i++ {
|
for i := 1; i < int(p/20) && messageSeq != 0; i++ {
|
||||||
h := ctx.GetGroupMessageHistory(gid, messageSeq)
|
h := ctx.GetGroupMessageHistory(gid, messageSeq)
|
||||||
msghists <- &h
|
msghists <- &h
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user