Skip to content

Commit

Permalink
✏️ 简化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 7, 2021
1 parent cd65340 commit 72fa626
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugin_acgimage/classify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 72fa626

Please sign in to comment.