From 56515a2f9f00515b1aca1f5e8f6fdd566f3f644a 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, 13 Nov 2022 01:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20`error=5Fcallable`=20wrapp?= =?UTF-8?q?er=20in=20`start`=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/system/start.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/system/start.py b/plugins/system/start.py index aa222452..cef02b63 100644 --- a/plugins/system/start.py +++ b/plugins/system/start.py @@ -16,6 +16,7 @@ from core.user.error import UserNotFoundError from modules.apihelper.hyperion import Verification from plugins.genshin.sign import SignSystem, NeedChallenge from plugins.genshin.verification import VerificationSystem +from utils.decorators.error import error_callable from utils.decorators.restricts import restricts from utils.helpers import get_genshin_client from utils.log import logger @@ -28,7 +29,8 @@ class StartPlugin(Plugin): self.sign_system = SignSystem(redis) self.verification_system = VerificationSystem(redis) - @handler(CommandHandler, command="start", block=False) + @handler.command("start", block=False) + @error_callable @restricts() async def start(self, update: Update, context: CallbackContext) -> None: user = update.effective_user