mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
✨ 添加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:
parent
b64190daeb
commit
2df5f770ce
@ -36,6 +36,7 @@ async def msg_process(msg: MessageReceive) -> Event:
|
|||||||
msg.user_type,
|
msg.user_type,
|
||||||
msg.group_id,
|
msg.group_id,
|
||||||
msg.user_id,
|
msg.user_id,
|
||||||
|
msg.sender,
|
||||||
msg.user_pm,
|
msg.user_pm,
|
||||||
real_bot_id=msg.bot_id,
|
real_bot_id=msg.bot_id,
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Any, List, Literal, Optional
|
from typing import Any, Dict, List, Literal, Optional
|
||||||
|
|
||||||
from msgspec import Struct
|
from msgspec import Struct
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ class MessageReceive(Struct):
|
|||||||
user_type: Literal['group', 'direct', 'channel', 'sub_channel'] = 'group'
|
user_type: Literal['group', 'direct', 'channel', 'sub_channel'] = 'group'
|
||||||
group_id: Optional[str] = None
|
group_id: Optional[str] = None
|
||||||
user_id: str = ''
|
user_id: str = ''
|
||||||
|
sender: Dict[str, Any] = {}
|
||||||
user_pm: int = 3
|
user_pm: int = 3
|
||||||
content: List[Message] = []
|
content: List[Message] = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user