From 0b07882a1665bef141ce2c89ca1226be55967656 Mon Sep 17 00:00:00 2001 From: scdhh Date: Wed, 3 Jan 2024 09:27:26 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game_data_processor/io_data_processor/__init__.py | 6 +++--- .../game_data_processor/top_data_processor/__init__.py | 6 +++--- .../game_data_processor/tos_data_processor/__init__.py | 9 ++++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/nonebot_plugin_tetris_stats/game_data_processor/io_data_processor/__init__.py b/nonebot_plugin_tetris_stats/game_data_processor/io_data_processor/__init__.py index 4a1b524..08f2010 100644 --- a/nonebot_plugin_tetris_stats/game_data_processor/io_data_processor/__init__.py +++ b/nonebot_plugin_tetris_stats/game_data_processor/io_data_processor/__init__.py @@ -91,7 +91,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) + await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -115,7 +115,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me): command_args=[], ) try: - await matcher.send(message + await proc.handle_query()) + await matcher.finish(message + await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -129,7 +129,7 @@ async def _(event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_query()) + await matcher.finish(await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e diff --git a/nonebot_plugin_tetris_stats/game_data_processor/top_data_processor/__init__.py b/nonebot_plugin_tetris_stats/game_data_processor/top_data_processor/__init__.py index 87b4eeb..d11f6b3 100644 --- a/nonebot_plugin_tetris_stats/game_data_processor/top_data_processor/__init__.py +++ b/nonebot_plugin_tetris_stats/game_data_processor/top_data_processor/__init__.py @@ -74,7 +74,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) + await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -98,7 +98,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me): command_args=[], ) try: - await matcher.send(message + await proc.handle_query()) + await matcher.finish(message + await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -112,7 +112,7 @@ async def _(event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_query()) + await matcher.finish(await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e diff --git a/nonebot_plugin_tetris_stats/game_data_processor/tos_data_processor/__init__.py b/nonebot_plugin_tetris_stats/game_data_processor/tos_data_processor/__init__.py index 9426ed8..f311efb 100644 --- a/nonebot_plugin_tetris_stats/game_data_processor/tos_data_processor/__init__.py +++ b/nonebot_plugin_tetris_stats/game_data_processor/tos_data_processor/__init__.py @@ -94,6 +94,7 @@ try: command_args=[], ) await finish_special_query(matcher, proc) + except ImportError: pass @@ -108,6 +109,7 @@ try: command_args=[], ) await finish_special_query(matcher, proc) + except ImportError: pass @@ -122,6 +124,7 @@ try: command_args=[], ) await finish_special_query(matcher, proc) + except ImportError: pass @@ -134,7 +137,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) + await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id())) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -158,7 +161,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me): command_args=[], ) try: - await matcher.send(message + await proc.handle_query()) + await matcher.finish(message + await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e @@ -172,7 +175,7 @@ async def _(event: Event, matcher: Matcher, account: User): command_args=[], ) try: - await matcher.send(await proc.handle_query()) + await matcher.finish(await proc.handle_query()) except NeedCatchError as e: await matcher.send(str(e)) raise HandleNotFinishedError from e