From ff6f0b6f39591716a26d62b8a195a0754f310701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Mon, 14 Nov 2022 21:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20wrong=20message=20reply?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/player_cards.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/genshin/player_cards.py b/plugins/genshin/player_cards.py index 6b037886..def0fdeb 100644 --- a/plugins/genshin/player_cards.py +++ b/plugins/genshin/player_cards.py @@ -159,13 +159,15 @@ class PlayerCards(Plugin, BasePlugin): await message.reply_text(data) return if data.characters is None: - await message.edit_text("请先将角色加入到角色展柜并允许查看角色详情后再使用此功能,如果已经添加了角色,请等待角色数据更新后重试") + await message.delete() + await callback_query.answer("请先将角色加入到角色展柜并允许查看角色详情后再使用此功能,如果已经添加了角色,请等待角色数据更新后重试", show_alert=True) return for characters in data.characters: if characters.name == result: break else: - await message.edit_text(f"角色展柜中未找到 {result} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试") + await message.delete() + await callback_query.answer(f"角色展柜中未找到 {result} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试", show_alert=True) return await callback_query.answer(text="正在渲染图片中 请稍等 请不要重复点击按钮", show_alert=False) await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)