transfer_chat_ownership

Function transfer_chat_ownership 

Source
pub async fn transfer_chat_ownership(
    chat_id: i64,
    user_id: i64,
    password: String,
    client_id: i32,
) -> Result<(), Error>
Expand description

Changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats

§Arguments

  • chat_id - Chat identifier
  • user_id - Identifier of the user to which transfer the ownership. The ownership can’t be transferred to a bot or to a deleted user
  • password - The 2-step verification password of the current user
  • client_id - The client id to send the request to