Skip to content
New issue

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

无法识别群成员管理员权限 #51

Open
HanamiSeishin opened this issue May 20, 2024 · 1 comment
Open

无法识别群成员管理员权限 #51

HanamiSeishin opened this issue May 20, 2024 · 1 comment
Labels
question 对错误或其它问题进行提问

Comments

@HanamiSeishin
Copy link

HanamiSeishin commented May 20, 2024

问题描述

starbot对接mirai-http-api,通过overflow转为onebot链接llonebot v3.24.2

starbot通过get_member获取bot账号的Member对象,Member的permission小于MemberPerm.Administrator
实际上bot账号为管理员权限,不符合预期

想要咨询一下是overflow的问题还是llonebot的问题

复现

尝试at全体

StarBot/starbot/core/sender.py:252

#过滤 Bot 不是群管理员时的 @全体成员 消息
try:
    bot_info = await self.__bot.get_member(message.id, self.qq)
except UnknownTarget:
    return new_chains, exception
if bot_info.permission < MemberPerm.Administrator:
    exception = NoPermissionException()
    chain = chain.exclude(AtAll)

Overflow 版本

overflow-2.16.0-f454a28

其他组件版本

llonebot v3.24.2

系统日志

2024-05-21 22:47:20.030 | WARNING | starbot.core.sender:252 | bot_info.permission =<普通成员>, MemberPerm.Administrator =<管理员>

网络日志

No response

补充信息

No response

@HanamiSeishin HanamiSeishin added the question 对错误或其它问题进行提问 label May 20, 2024
@NNanfeng
Copy link

我是用graia对接mirai-http-api也有类似的问题,我是用如下代码(修改群成员的群名片)时也会提示权限不足
info = MemberInfo(name=f"{username}")
# info = MemberInfo(nickname=f"{username}", special_title="特殊头衔")
try:
await app.modify_member_info(group=group, info=info, member=member)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 对错误或其它问题进行提问
Projects
None yet
Development

No branches or pull requests

2 participants