From 6062d9d79696e25810b04b853f5e39b215fe3301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 22 Jun 2022 21:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20`restricts`=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=A7=A6=E5=8F=91=E6=B4=AA=E6=B0=B4=E9=99=90=E5=88=B6?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/base.py b/plugins/base.py index a9aa1743..022b26ab 100644 --- a/plugins/base.py +++ b/plugins/base.py @@ -149,9 +149,9 @@ def restricts(filters_chat: ChatType = filters.ALL, return_data=None, try_delete except BadRequest as error: Log.warning("删除消息失败", error) return return_data - - if count >= 1: - context.user_data["usage_count"] = count - 1 + else: + if count >= 1: + context.user_data["usage_count"] = count - 1 context.user_data["command_time"] = time.time()