From 3d81376bffd4699aebd9c603c06a2cfc92f1548d Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Sat, 16 Dec 2023 21:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E6=BC=8F?= =?UTF-8?q?=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + gsuid_core/bot.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2207b28..d9ff1c9 100644 --- a/.gitignore +++ b/.gitignore @@ -671,5 +671,6 @@ gs_restart.sh gsuid_core/plugins/* !gsuid_core/plugins/core_command !gsuid_core/plugins/gs_test.py +!gsuid_core/utils/backup logs .pdm-python diff --git a/gsuid_core/bot.py b/gsuid_core/bot.py index bb5c1c8..7ff5820 100644 --- a/gsuid_core/bot.py +++ b/gsuid_core/bot.py @@ -228,7 +228,7 @@ class Bot: await self.send(md) success = True - if istry and not success and self.ev.bot_id in isc: + if not success and istry and self.ev.bot_id in isc: md = await markdown_to_template_markdown(md) fake_buttons = parse_button(_buttons) for custom_template_id in button_templates: @@ -239,8 +239,8 @@ class Bot: custom_template_id ) ) - success = True await self.send(md) + success = True break if ( @@ -274,6 +274,11 @@ class Bot: ) ) await self.send(_reply) + success = True + + if not success: + await self.send(_reply) + elif reply: await self.send(reply)