Chat.promote_member()

Chat.promote_member()

Bound method promote_member of Chat.

Use as a shortcut for:

await client.promote_chat_member(
    chat_id=chat_id,
    user_id=user_id,
    title=admin_title
)

Example

await chat.promote_member(123456789)
Parameters:
  • 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.

  • title (str, optional) – A custom title that will be shown to all members instead of “Owner” or “Admin”. Pass None or “” (empty string) will keep the current title. If you want to delete the custom title, use set_administrator_title() method.

Returns:

bool – True on success.

Raises:

RPCError – In case of a Telegram RPC error.