diff --git a/plugin/word_count/word_count.go b/plugin/word_count/word_count.go index fa719355..f26cd885 100644 --- a/plugin/word_count/word_count.go +++ b/plugin/word_count/word_count.go @@ -3,6 +3,13 @@ package wordcount import ( "fmt" + "os" + "regexp" + "sort" + "strconv" + "strings" + "time" + "github.com/FloatTech/zbputils/binary" "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" @@ -13,12 +20,6 @@ import ( "github.com/wcharczuk/go-chart/v2" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" - "os" - "regexp" - "sort" - "strconv" - "strings" - "time" ) var ( @@ -94,7 +95,6 @@ func init() { if re.MatchString(tex) && (i >= len(stopwords) || stopwords[i] != tex) { messageMap[tex]++ } - } } messageSeq = h.Get("messages.0.message_seq").Int() @@ -155,7 +155,6 @@ func init() { return } ctx.SendChain(message.Image("file:///" + file.BOTPATH + "/" + drawedFile)) - }) }