From 72fa62622f76282c056e726f3f79e6f419c9c587 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 14:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_acgimage/classify.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin_acgimage/classify.go b/plugin_acgimage/classify.go index 2a590d81..f36e3baf 100644 --- a/plugin_acgimage/classify.go +++ b/plugin_acgimage/classify.go @@ -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) {