mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
Add files via upload
This commit is contained in:
parent
34ed8c89fd
commit
1da3486d00
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
dbpath = "data/Purechat/"
|
||||
dbpath = "data/thesaurus/"
|
||||
dbfile = dbpath + "kimoi_clear.json"
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
initPureChatList(func() {
|
||||
initthesaurusList(func() {
|
||||
engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle(
|
||||
func(ctx *zero.Ctx) {
|
||||
key := ctx.MessageString()
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
|
||||
type kimogo = map[string]*[]string
|
||||
|
||||
func initPureChatList(postinit func()) {
|
||||
func initthesaurusList(postinit func()) {
|
||||
go func() {
|
||||
defer order.DoneOnExit()()
|
||||
process.SleepAbout1sTo2s()
|
||||
@ -30,7 +30,7 @@ func initPureChatList(postinit func()) {
|
||||
for k := range kimogomap {
|
||||
chatList = append(chatList, k)
|
||||
}
|
||||
logrus.Infoln("[purechat]加载", len(chatList), "条kimoi")
|
||||
logrus.Infoln("[thesaurus]加载", len(chatList), "条kimoi")
|
||||
postinit()
|
||||
}()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user