Add files via upload

This commit is contained in:
MoeMagicMango 2022-02-12 20:46:34 +08:00 committed by GitHub
parent 34ed8c89fd
commit 1da3486d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import (
) )
const ( const (
dbpath = "data/Purechat/" dbpath = "data/thesaurus/"
dbfile = dbpath + "kimoi_clear.json" dbfile = dbpath + "kimoi_clear.json"
) )
@ -26,7 +26,7 @@ var (
) )
func init() { func init() {
initPureChatList(func() { initthesaurusList(func() {
engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle(
func(ctx *zero.Ctx) { func(ctx *zero.Ctx) {
key := ctx.MessageString() key := ctx.MessageString()

View File

@ -14,7 +14,7 @@ import (
type kimogo = map[string]*[]string type kimogo = map[string]*[]string
func initPureChatList(postinit func()) { func initthesaurusList(postinit func()) {
go func() { go func() {
defer order.DoneOnExit()() defer order.DoneOnExit()()
process.SleepAbout1sTo2s() process.SleepAbout1sTo2s()
@ -30,7 +30,7 @@ func initPureChatList(postinit func()) {
for k := range kimogomap { for k := range kimogomap {
chatList = append(chatList, k) chatList = append(chatList, k)
} }
logrus.Infoln("[purechat]加载", len(chatList), "条kimoi") logrus.Infoln("[thesaurus]加载", len(chatList), "条kimoi")
postinit() postinit()
}() }()
} }