Files
AstrBot/src-new/astrbot_sdk/api/star/__init__.py
whatevertogo 96ea836edc feat: Enhance legacy API with message chain support and new context handling
- Updated `LegacyContext.send_message` to handle rich message chains using `send_chain`.
- Introduced `LegacyStar` class for backward compatibility with legacy plugins.
- Added `register` decorator for legacy plugin metadata.
- Enhanced `MessageChain` class with `to_payload` and `is_plain_text_only` methods.
- Updated `AstrMessageEvent.send` method to utilize `send_chain` for rich messages.
- Implemented `send_chain` method in `PlatformClient` for sending complex message structures.
- Added capability routing for `platform.send_chain`.
- Introduced tests for new functionality, ensuring compatibility with legacy plugins and message handling.
2026-03-13 05:34:14 +08:00

8 lines
233 B
Python

"""旧版 ``astrbot_sdk.api.star`` 的兼容入口。"""
from ..._legacy_api import LegacyStar as Star, register
from .context import Context
from .star import StarMetadata
__all__ = ["Context", "Star", "StarMetadata", "register"]