✏️ 简化代码

This commit is contained in:
fumiama 2021-08-07 14:11:02 +08:00
parent cd6534097e
commit 72fa62622f

View File

@ -15,6 +15,7 @@ import (
const (
lolipxy = "http://sayuri.fumiama.top:62002/dice?class=0&loli=true&r18=true"
apihead = "http://sayuri.fumiama.top:8080/img?path="
)
var (
@ -90,6 +91,13 @@ func init() { // 插件主体
}
}
})
zero.OnRegex(`^给你点提示哦:(.*)$`, zero.OnlyPrivate).SetBlock(true).SetPriority(20).
Handle(func(ctx *zero.Ctx) {
dhash := ctx.State["regex_matched"].([]string)[1]
if len(dhash) == 5 {
ctx.Send(message.Image(apihead + dhash))
}
})
}
func setLastMsg(id int64, msg int64) {