From 8594b59783ec9daff4db93a653d81e9478fd5014 Mon Sep 17 00:00:00 2001 From: passthem Date: Sun, 19 Oct 2025 16:51:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20LongTask=20=E5=9C=A8=20Dis?= =?UTF-8?q?cord=20=E5=92=8C=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E8=BF=94=E5=9B=9E=E6=98=AF=E5=90=A6=E9=A1=BA?= =?UTF-8?q?=E5=88=A9=E5=AE=8C=E6=88=90=E4=BB=BB=E5=8A=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- konabot/common/longtask.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/konabot/common/longtask.py b/konabot/common/longtask.py index 82be551..3c6f858 100644 --- a/konabot/common/longtask.py +++ b/konabot/common/longtask.py @@ -89,6 +89,7 @@ class LongTaskTarget(BaseModel): ) return False await bot.send_message(self.channel_id, cast(Any, await msg.export())) + return True if self.platform == "discord": if not isinstance(bot, DCBot): logger.warning( @@ -104,6 +105,7 @@ class LongTaskTarget(BaseModel): ), tts=False, ) + return True logger.warning(f"没有一个平台是期望的平台 PLATFORM={self.platform}") return False