diff --git a/astrbot/core/platform/sources/lark/lark_event.py b/astrbot/core/platform/sources/lark/lark_event.py index 821bcc6af..1c7dd0b43 100644 --- a/astrbot/core/platform/sources/lark/lark_event.py +++ b/astrbot/core/platform/sources/lark/lark_event.py @@ -349,12 +349,16 @@ class LarkMessageEvent(AstrMessageEvent): else: return None - return { - "schema": "2.0", - "body": { - "elements": elements, - }, - } if elements else None + return ( + { + "schema": "2.0", + "body": { + "elements": elements, + }, + } + if elements + else None + ) @staticmethod async def _send_interactive_card(