File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import (
1212 "github.com/FloatTech/zbputils/control/order"
1313)
1414
15+ const hso = "https://gchat.qpic.cn/gchatpic_new//--4234EDEC5F147A4C319A41149D7E0EA9/0"
16+
1517func init () {
1618 engine := control .Register ("nsfw" , order .AcquirePrio (), & control.Options {
1719 DisableOnDefault : false ,
@@ -31,11 +33,10 @@ func init() {
3133 ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , message .Text (judge (p [0 ]))))
3234 }
3335 })
34- en := control .Register ("nsfwauto" , order .AcquirePrio (), & control.Options {
36+ control .Register ("nsfwauto" , order .AcquirePrio (), & control.Options {
3537 DisableOnDefault : true ,
3638 Help : "nsfw图片自动识别\n - 当图片属于非 neutral 类别时自动发送评价" ,
37- })
38- en .OnMessage (zero .IsPicExists ).SetBlock (false ).
39+ }).OnMessage (zero .HasPicture ).SetBlock (false ).
3940 Handle (func (ctx * zero.Ctx ) {
4041 url := ctx .State ["image_url" ].([]string )
4142 if len (url ) > 0 {
@@ -96,6 +97,6 @@ func autojudge(ctx *zero.Ctx, p nsfw.Picture) {
9697 i ++
9798 }
9899 if i > 0 {
99- ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , message .Text (c )))
100+ ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , message .Text (c , " \n " ), message . Image ( hso )))
100101 }
101102}
You can’t perform that action at this time.
0 commit comments