From 254271db0f3bf63f3c9eeefa7a10795a54ffb99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 4 Oct 2022 18:28:09 +0800 Subject: [PATCH] fix MustProvidePhoto --- rules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.go b/rules.go index 7cbf4a6..7f6a755 100644 --- a/rules.go +++ b/rules.go @@ -367,7 +367,7 @@ func IsPhoto(ctx *Ctx) bool { } // MustProvidePhoto 消息不存在图片阻塞120秒至有图片,超时返回 false -func MustProvidePhoto(ctx *Ctx, needphohint, failhint string) Rule { +func MustProvidePhoto(needphohint, failhint string) Rule { return func(ctx *Ctx) bool { msg, ok := ctx.Value.(*tgba.Message) if ok && len(msg.Photo) > 0 { // 确保无空