mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
edit readme
This commit is contained in:
parent
a7ccf302f2
commit
4305f589df
@ -1474,3 +1474,9 @@ GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w"
|
|||||||
|
|
||||||
- [ZeroBot](https://github.com/wdvxdr1123/ZeroBot)
|
- [ZeroBot](https://github.com/wdvxdr1123/ZeroBot)
|
||||||
- [ATRI](https://github.com/Kyomotoi/ATRI)
|
- [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
2
data
@ -1 +1 @@
|
|||||||
Subproject commit 8920298a4fab8a64e6b7da157c2152f5868390c2
|
Subproject commit 215a2178676dbbe665e663b1c92bd83a3406c18f
|
||||||
@ -12,7 +12,12 @@ import (
|
|||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"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() {
|
func init() {
|
||||||
engine := control.Register("thesaurus", &ctrl.Options[*zero.Ctx]{
|
engine := control.Register("thesaurus", &ctrl.Options[*zero.Ctx]{
|
||||||
@ -39,7 +44,7 @@ func init() {
|
|||||||
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()
|
||||||
val := *kimomap[key]
|
val := kimomap[key]
|
||||||
text := val[rand.Intn(len(val))]
|
text := val[rand.Intn(len(val))]
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) // 来自于 https://github.com/Kyomotoi/AnimeThesaurus 的回复 经过二次修改
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) // 来自于 https://github.com/Kyomotoi/AnimeThesaurus 的回复 经过二次修改
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user