diff --git a/plugins/genshin/help.py b/plugins/genshin/help.py index c20764e7..cd7edaa1 100644 --- a/plugins/genshin/help.py +++ b/plugins/genshin/help.py @@ -18,13 +18,16 @@ class HelpPlugin(Plugin): @handler(CommandHandler, command="help", block=False) @error_callable @restricts() - async def start(self, update: Update, _: CallbackContext): + async def start(self, update: Update, context: CallbackContext): user = update.effective_user message = update.effective_message - logger.info(f"用户 {user.full_name}[{user.id}] 发出help命令") + logger.info("用户 %s[%s] 发出help命令", user.full_name, user.id) await message.reply_chat_action(ChatAction.TYPING) render_result = await self.template_service.render( - "bot/help/help.html", {}, {"width": 1280, "height": 900}, ttl=30 * 24 * 60 * 60 + "bot/help/help.html", + {"bot_username": context.bot.username}, + {"width": 1280, "height": 900}, + ttl=30 * 24 * 60 * 60, ) await message.reply_chat_action(ChatAction.UPLOAD_PHOTO) await render_result.reply_photo(message, filename="help.png", allow_sending_without_reply=True) diff --git a/resources/bot/help/help.html b/resources/bot/help/help.html index 72ab232f..fdf96525 100644 --- a/resources/bot/help/help.html +++ b/resources/bot/help/help.html @@ -45,12 +45,6 @@