ieew / nonebot_adapter_mirai2

nonebot2 的三方 adapter,用以为 nonebot2 提供 MiraiApiHttp2 协议支持
https://ieew.github.io/nonebot_adapter_mirai2/
GNU Affero General Public License v3.0
20 stars 6 forks source link

获取群成员及好友资料信息错误 #25

Closed RainChain-Zero closed 2 years ago

RainChain-Zero commented 2 years ago

RT.

如何复现

member_info = await bot.member_pro_file(target=event.sender.group.id,member_id=event.sender.id)
friend_info = await bot.friend_pro_file(target=event.sender.id)

非预期报告

nonebot.exception.ActionFailed: mirai V2 | {'code': 6, 'msg': '指定操作不支持'}

Traceback

图片 图片

版本信息

mirai-api-http:2.4.0 nonebot_adapter_mirai2:0.0.11

也有可能是我使用方法有误或者上游出现问题×

ieew commented 2 years ago

试试 bot.member_profile 看看

RainChain-Zero commented 2 years ago

试试 bot.member_profile 看看

的确不再显示“指定操作不支持了”,但是变成了这个--->

raise ActionFailed(
nonebot.exception.ActionFailed: mirai V2 | {'nickname': '゛xxx', 'email': 'xxx', 'age': 0, 'level': 48, 'sign': 'xxx', 'sex': 'MALE'}

即获取到了对应资料信息,但被视为了错误× 感谢答复!

ieew commented 2 years ago

今天有空,瞄了一眼,知道是怎么回事了.........

ieew commented 2 years ago

我在dev分支提交了一点点代码,我觉得应该解决了这个问题,你可以试试看。

RainChain-Zero commented 2 years ago

:white_check_mark:经测试,问题解决 辛苦啦——