From ef31faf1aef9f6942e258988428a3ba5892ff5ce Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 9 Feb 2023 11:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20gacha=5Flog=20command=20fi?= =?UTF-8?q?lter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nahida --- plugins/genshin/gacha/gacha_log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/genshin/gacha/gacha_log.py b/plugins/genshin/gacha/gacha_log.py index 050216c0..c6dc4216 100644 --- a/plugins/genshin/gacha/gacha_log.py +++ b/plugins/genshin/gacha/gacha_log.py @@ -216,7 +216,7 @@ class GachaLogPlugin(Plugin.Conversation, BasePlugin.Conversation): return ConversationHandler.END @conversation.state(state=INPUT_URL) - @handler.message(filters=filters.TEXT & ~filters.COMMAND, block=False) + @handler.message(filters=~filters.COMMAND, block=False) @restricts() @error_callable async def import_data_from_message(self, update: Update, _: CallbackContext) -> int: @@ -225,6 +225,9 @@ class GachaLogPlugin(Plugin.Conversation, BasePlugin.Conversation): if message.document: await self.import_from_file(user, message) return ConversationHandler.END + elif not message.text: + await message.reply_text("请发送正确的抽卡记录链接") + return INPUT_URL authkey = from_url_get_authkey(message.text) reply = await message.reply_text("小派蒙正在从服务器获取数据,请稍后") await message.reply_chat_action(ChatAction.TYPING)