From 7f91d7ef31598f864da8ff33e1326003bd3f0396 Mon Sep 17 00:00:00 2001 From: Nahida Date: Thu, 5 Jan 2023 16:40:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Update=20`help.html`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/help.py | 9 ++++++--- resources/bot/help/help.html | 22 ++++++++++------------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plugins/genshin/help.py b/plugins/genshin/help.py index c20764e..cd7edaa 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 72ab232..fdf9652 100644 --- a/resources/bot/help/help.html +++ b/resources/bot/help/help.html @@ -45,12 +45,6 @@
/material
角色培养素材查询
-
-
- /artifact_rate -
-
圣遗物评分
-
@@ -72,28 +66,28 @@ /dailynote
-
查询角色当前状态
+
查询实时便笺
/ledger
-
查询当月旅行扎记
+
查询当月旅行札记
/abyss
-
查询当期深渊螺旋战绩
+
查询当期深渊战绩
/abyss_team
-
深渊推荐配队
+
查询深渊推荐配队
@@ -149,7 +143,7 @@
-
/gacha
+
/wish
抽卡模拟器(非洲人模拟器)
@@ -204,9 +198,13 @@
-
角色名
+
@{{bot_username}} 角色名
查询角色攻略
+
+
@{{bot_username}} 武器名
+
查询武器信息
+