From 5ecdfc3c09449a6d581e3cf14d1bfe97ee707e9c 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, 15 Mar 2023 12:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20issue=20of=20incorre?= =?UTF-8?q?ct=20parameter=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/app/start.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/app/start.py b/plugins/app/start.py index d729357..351b80a 100644 --- a/plugins/app/start.py +++ b/plugins/app/start.py @@ -45,7 +45,7 @@ class StartPlugin(Plugin): await self.process_validate(message, user, bot_username=context.bot.username) elif args[0] == "sign": logger.info("用户 %s[%s] 通过start命令 获取签到信息", user.full_name, user.id) - await self.get_sign_button(message, user) + await self.get_sign_button(message, user, bot_username=context.bot.username) elif args[0].startswith("challenge_"): _data = args[0].split("_") _command = _data[1] @@ -118,11 +118,11 @@ class StartPlugin(Plugin): ), ) - async def get_sign_button(self, message: Message, user: User): + async def get_sign_button(self, message: Message, user: User, bot_username: str): try: client = await self.genshin_helper.get_genshin_client(user.id) await message.reply_chat_action(ChatAction.TYPING) - button = await self.sign_system.get_challenge_button(client.uid, user.id, callback=False) + button = await self.sign_system.get_challenge_button(bot_username, client.uid, user.id, callback=False) if not button: await message.reply_text("验证请求已过期。", allow_sending_without_reply=True) return