From 8db608c156c6b4d6d0ba6b05e50e4a29212da478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Sun, 11 Sep 2022 00:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E7=BB=99=E7=BE=A4=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=A8=A1=E5=9D=97=E6=B7=BB=E5=8A=A0=20`@restricts`=20?= =?UTF-8?q?=E4=BF=AE=E9=A5=B0=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/system/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/system/auth.py b/plugins/system/auth.py index 91f60fd..42bf4ad 100644 --- a/plugins/system/auth.py +++ b/plugins/system/auth.py @@ -12,6 +12,7 @@ from telegram.helpers import escape_markdown from core.bot import bot from core.plugin import Plugin, handler from core.quiz import QuizService +from utils.decorators.restricts import restricts from utils.log import logger from utils.random import MT19937Random @@ -101,6 +102,7 @@ class GroupJoiningVerification(Plugin): logger.exception(exc) @handler(CallbackQueryHandler, pattern=r"^auth_admin\|", block=False) + @restricts(without_overlapping=True) async def admin(self, update: Update, context: CallbackContext) -> None: async def admin_callback(callback_query_data: str) -> Tuple[str, int]: @@ -159,6 +161,7 @@ class GroupJoiningVerification(Plugin): schedule.remove() @handler(CallbackQueryHandler, pattern=r"^auth_challenge\|", block=False) + @restricts(without_overlapping=True) async def query(self, update: Update, context: CallbackContext) -> None: async def query_callback(callback_query_data: str) -> Tuple[int, bool, str, str]: