🎨 Update help.html

This commit is contained in:
Nahida 2023-01-05 16:40:46 +08:00 committed by GitHub
parent 869713542a
commit 7f91d7ef31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -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)

View File

@ -45,12 +45,6 @@
<div class="command-name">/material</div>
<div class="command-description">角色培养素材查询</div>
</div>
<div class="command">
<div class="command-name">
/artifact_rate
</div>
<div class="command-description">圣遗物评分</div>
</div>
<!-- UID 查询类 -->
<div class="command">
<div class="command-name">
@ -72,28 +66,28 @@
/dailynote
<i class="fa fa-id-card-o ml-2"></i>
</div>
<div class="command-description">查询角色当前状态</div>
<div class="command-description">查询实时便笺</div>
</div>
<div class="command">
<div class="command-name">
/ledger
<i class="fa fa-id-card-o ml-2"></i>
</div>
<div class="command-description">查询当月旅行</div>
<div class="command-description">查询当月旅行</div>
</div>
<div class="command">
<div class="command-name">
/abyss
<i class="fa fa-id-card-o ml-2"></i>
</div>
<div class="command-description">查询当期深渊螺旋战绩</div>
<div class="command-description">查询当期深渊战绩</div>
</div>
<div class="command">
<div class="command-name">
/abyss_team
<i class="fa fa-id-card-o ml-2"></i>
</div>
<div class="command-description">深渊推荐配队</div>
<div class="command-description">查询深渊推荐配队</div>
</div>
<div class="command">
<div class="command-name">
@ -149,7 +143,7 @@
</div>
<div class="grid grid-cols-4 py-4 px-2">
<div class="command">
<div class="command-name">/gacha</div>
<div class="command-name">/wish</div>
<div class="command-description">抽卡模拟器(非洲人模拟器)</div>
</div>
<div class="command">
@ -204,9 +198,13 @@
</div>
<div class="grid grid-cols-2 py-4 px-2">
<div class="command">
<div class="command-name">角色名</div>
<div class="command-name">@{{bot_username}} 角色名</div>
<div class="command-description">查询角色攻略</div>
</div>
<div class="command">
<div class="command-name">@{{bot_username}} 武器名</div>
<div class="command-description">查询武器信息</div>
</div>
</div>
</div>