mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 22:40:23 +08:00
✏️ 简化代码
This commit is contained in:
parent
cd6534097e
commit
72fa62622f
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user