添加ev.sender保存用户名等信息 (#38)

* 添加ev.sender

* 添加ev.sender保存用户名等信息

* 🚨 `pre-commit-ci`修复格式错误

* 🎨 优化默认类型

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wuyi无疑 <444835641@qq.com>
This commit is contained in:
季落 2023-11-06 21:33:38 +08:00 committed by GitHub
parent b64190daeb
commit 2df5f770ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ async def msg_process(msg: MessageReceive) -> Event:
msg.user_type,
msg.group_id,
msg.user_id,
msg.sender,
msg.user_pm,
real_bot_id=msg.bot_id,
)

View File

@ -1,4 +1,4 @@
from typing import Any, List, Literal, Optional
from typing import Any, Dict, List, Literal, Optional
from msgspec import Struct
@ -15,6 +15,7 @@ class MessageReceive(Struct):
user_type: Literal['group', 'direct', 'channel', 'sub_channel'] = 'group'
group_id: Optional[str] = None
user_id: str = ''
sender: Dict[str, Any] = {}
user_pm: int = 3
content: List[Message] = []