Open blacknoize404 opened 1 year ago
This is your error, you must add ChatPrivileges
code example:
await client.promote_chat_member(
chat,
admin,
ChatPrivileges(
can_invite_users=True,
can_promote_members=True,
can_manage_chat=True,
can_manage_video_chats=True,
can_change_info=True,
can_delete_messages=True,
can_pin_messages=True,
can_restrict_members=True,
can_post_messages=True,
can_edit_messages=True
)
)
Such questions should be asked at https://t.me/pyrogramchat or simply read the documents...
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
Using pyrogram as user client:
The promote_chat_member method does not work to assign privileges to a bot you want to add to a channel.
Then using the add_chat_members method throws a 400 error because the bot needs admin permissions to be added to the channel.
I haven't found any kind of way to make this possible.
Steps to reproduce
Create an script and try to promote the bot in the channel Then add the bot Throws error 400...
Code example
Logs
No response