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