mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 14:30:10 +08:00
Add files via upload
This commit is contained in:
parent
34ed8c89fd
commit
1da3486d00
@ -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()
|
||||||
|
|||||||
@ -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()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user