diff --git a/README.md b/README.md index 84bc6a33..36d7e6f8 100644 --- a/README.md +++ b/README.md @@ -1474,3 +1474,9 @@ GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w" - [ZeroBot](https://github.com/wdvxdr1123/ZeroBot) - [ATRI](https://github.com/Kyomotoi/ATRI) + +同时感谢以下开发者对 ZeroBot-Plugin 作出的贡献: + + + + diff --git a/data b/data index 8920298a..215a2178 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 8920298a4fab8a64e6b7da157c2152f5868390c2 +Subproject commit 215a2178676dbbe665e663b1c92bd83a3406c18f diff --git a/plugin/thesaurus/chat.go b/plugin/thesaurus/chat.go index a18c9a4c..adfe2a0c 100644 --- a/plugin/thesaurus/chat.go +++ b/plugin/thesaurus/chat.go @@ -12,7 +12,12 @@ import ( "github.com/wdvxdr1123/ZeroBot/message" ) -type kimo = map[string]*[]string +type kimo = map[string][]string + +type simai struct { + D map[string][]string `yaml:"傲娇"` + K map[string][]string `yaml:"可爱"` +} func init() { engine := control.Register("thesaurus", &ctrl.Options[*zero.Ctx]{ @@ -39,7 +44,7 @@ func init() { engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( func(ctx *zero.Ctx) { key := ctx.MessageString() - val := *kimomap[key] + val := kimomap[key] text := val[rand.Intn(len(val))] ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) // 来自于 https://github.com/Kyomotoi/AnimeThesaurus 的回复 经过二次修改 })