feat: 配置项目的热修改

This commit is contained in:
2024-03-29 14:58:24 +08:00
parent f23567194c
commit aed63c34c9
10 changed files with 148 additions and 89 deletions

View File

@ -8,7 +8,7 @@ from .ly_typing import T_Bot, T_MessageEvent
async def send_markdown(markdown: str, bot: T_Bot, *, message_type: str = None, session_id: str | int = None, event: T_MessageEvent = None, **kwargs) -> dict[
str, Any]:
formatted_md = v11.unescape(markdown).replace("\n", r"\n").replace("\"", r'\\\"')
formatted_md = v11.unescape(markdown).replace("\n", r"\n").replace('"', r'\\\"')
if event is not None and message_type is None:
message_type = event.message_type
session_id = event.user_id if event.message_type == "private" else event.group_id