promote_chat_member()#

Client.promote_chat_member()#

Promote or demote a user in a supergroup or a channel.

You must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • user_id (int | str) – Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str).

  • privileges (ChatPrivileges, optional) – New user privileges.

Returns:

bool – True on success.

Example

# Promote chat member to admin
await app.promote_chat_member(chat_id, user_id)