We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class Private_Message(Message): """私聊消息""" def __init__(self, cqapi: cqHttpApi, event: Message_Event, message_data: dict[str, Any]) -> None: super().__init__(cqapi, event, message_data) self.sender: Private_User = Private_User(self._cqapi, message_data["sender"]) """发送人""" self.target_id: int = message_data["target_id"] # 抛出异常,target_id 不存在 """接收者 QQ 号"""
实际接收的 message json
{'post_type': 'message', 'message_type': 'private', 'time': 1689303412, 'self_id': ***, 'sub_type': 'group', 'temp_source': 0, 'message_id': 61502, 'user_id': ***, 'message': '123', 'raw_message': '123', 'font': 0, 'sender': {'age': 0, 'group_id': ***, 'nickname': 'Cody', 'sex': 'unknown', 'user_id': ***}}
貌似没有 target_id 这一项?我理解这里应该是 self_id ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
实际接收的 message json
貌似没有 target_id 这一项?我理解这里应该是 self_id ?
The text was updated successfully, but these errors were encountered: