edit readme

This commit is contained in:
源文雨 2022-12-02 14:12:36 +08:00
parent a7ccf302f2
commit 4305f589df
3 changed files with 14 additions and 3 deletions

View File

@ -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 作出的贡献:
<a href="https://github.com/FloatTech/ZeroBot-Plugin/graphs/contributors">
<img src="https://contrib.rocks/image?repo=FloatTech/ZeroBot-Plugin&max=1000" />
</a>

2
data

@ -1 +1 @@
Subproject commit 8920298a4fab8a64e6b7da157c2152f5868390c2
Subproject commit 215a2178676dbbe665e663b1c92bd83a3406c18f

View File

@ -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 的回复 经过二次修改
})