我将我的机器人添加到群组中并给了他所有可能的权限。当我调用 getChatAdministrators
api 时,我可以看到该机器人具有 can_promote_members
权限:
{
"ok": true,
"result": [
{
"user": {
"id": _id_,
"is_bot": true,
"first_name": "MyBot",
"username": "TestBot"
},
"status": "administrator",
"can_be_edited": false,
"can_manage_chat": true,
"can_change_info": true,
"can_delete_messages": true,
"can_invite_users": true,
"can_restrict_members": true,
"can_pin_messages": true,
"can_promote_members": true,
"can_manage_voice_chats": true,
"custom_title": "Admin",
"is_anonymous": true
},
...
]
}
但是当我尝试使用 promoteChatMember
提升用户时,我收到一个错误:
{
"ok": false,
"error_code": 403,
"description": "Forbidden: RIGHT_FORBIDDEN"
}
我做错了什么?
答案 0 :(得分:0)
我发现了一个问题。我不应该在 can_post_messages
中填写字段 can_edit_messages
和 promoteChatMember
,因为它们仅用于 channels。