diff --git a/astrbot/core/platform/sources/telegram/tg_event.py b/astrbot/core/platform/sources/telegram/tg_event.py index f963969b7c..8d86570739 100644 --- a/astrbot/core/platform/sources/telegram/tg_event.py +++ b/astrbot/core/platform/sources/telegram/tg_event.py @@ -389,6 +389,9 @@ async def _send_message_draft( message_thread_id: 可选,目标消息线程 ID parse_mode: 可选,消息文本的解析模式 """ + if not text or not text.strip(): + return + kwargs: dict[str, Any] = {} if message_thread_id: kwargs["message_thread_id"] = int(message_thread_id)