Closed super1207 closed 10 months ago
我尝试对接我的satori适配器:https://github.com/super1207/satoricq 我用适配器向satori-python发送了一个消息事件,然后satori-python报了这个错误:
看起来像是我发送的事件中多出了nick字段?但是这是在 https://satori.js.org/zh-CN/resources/user.html#user 中允许存在的
发送如下格式的消息事件给satori-python: {"op": 0, "body": {"id": 0, "type": "message-created", "platform": "satori", "self_id": "2044078478", "timestamp": 1701842313000, "channel": {"id": "GROUP_7021447456313511", "type": 0}, "guild": {"id": "GROUP_7021447456313511"}, "member": {"nick": "super1208", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon", "joined_at": 1675500752000}, "message": {"id": "-1347721390", "content": "\u4f60\u597d", "created_at": 1701842313000}, "role": {"id": "owner", "name": "owner"}, "user": {"id": "2139689190", "name": "super1207", "nick": "super1207", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon"}}}
{"op": 0, "body": {"id": 0, "type": "message-created", "platform": "satori", "self_id": "2044078478", "timestamp": 1701842313000, "channel": {"id": "GROUP_7021447456313511", "type": 0}, "guild": {"id": "GROUP_7021447456313511"}, "member": {"nick": "super1208", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon", "joined_at": 1675500752000}, "message": {"id": "-1347721390", "content": "\u4f60\u597d", "created_at": 1701842313000}, "role": {"id": "owner", "name": "owner"}, "user": {"id": "2139689190", "name": "super1207", "nick": "super1207", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon"}}}
不报错,正常解析。
见问题
https://github.com/RF-Tar-Railt/satori-python/releases/tag/v0.9.2
thanks,已经测试了,可以正常工作
请确认:
Bug
问题
我尝试对接我的satori适配器:https://github.com/super1207/satoricq 我用适配器向satori-python发送了一个消息事件,然后satori-python报了这个错误:
看起来像是我发送的事件中多出了nick字段?但是这是在 https://satori.js.org/zh-CN/resources/user.html#user 中允许存在的
如何复现
发送如下格式的消息事件给satori-python:
{"op": 0, "body": {"id": 0, "type": "message-created", "platform": "satori", "self_id": "2044078478", "timestamp": 1701842313000, "channel": {"id": "GROUP_7021447456313511", "type": 0}, "guild": {"id": "GROUP_7021447456313511"}, "member": {"nick": "super1208", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon", "joined_at": 1675500752000}, "message": {"id": "-1347721390", "content": "\u4f60\u597d", "created_at": 1701842313000}, "role": {"id": "owner", "name": "owner"}, "user": {"id": "2139689190", "name": "super1207", "nick": "super1207", "avatar": "https://img.kookapp.cn/avatars/2023-07/SkpJ5zCSXn06j06j.png?x-oss-process=style/icon"}}}
预期行为
不报错,正常解析。
使用环境:
日志/截图
见问题