public function promoteChatMember(
        $chatId,
        $userId,
        $canChangeInfo = true,
        $canPostMessages = true,
        $canEditMessages = true,
        $canDeleteMessages = true,
        $canInviteUsers = true,
        $canRestrictMembers = true,
        $canPinMessages = true,
        $canPromoteMembers = true
    ) {
        return $this->call('promoteChatMember', [
            'chat_id' => $chatId,
            'user_id' => $userId,
            'can_change_info' => $canChangeInfo,
            'can_post_messages' => $canPostMessages,
            'can_edit_messages' => $canEditMessages,
            'can_delete_messages' => $canDeleteMessages,
            'can_invite_users' => $canInviteUsers,
            'can_restrict_members' => $canRestrictMembers,
            'can_pin_messages' => $canPinMessages,
            'can_promote_members' => $canPromoteMembers
        ]);
    }
public function promoteChatMember(
        $chatId,
        $userId,
        $canChangeInfo = true,
        $canPostMessages = true,
        $canEditMessages = true,
        $canDeleteMessages = true,
        $canInviteUsers = true,
        $canRestrictMembers = true,
        $canPinMessages = true,
        $canPromoteMembers = true
    ) {
        return $this->call('promoteChatMember', [
            'chat_id' => $chatId,
            'user_id' => $userId,
            'can_change_info' => $canChangeInfo,
            'can_post_messages' => $canPostMessages,
            'can_edit_messages' => $canEditMessages,
            'can_delete_messages' => $canDeleteMessages,
            'can_invite_users' => $canInviteUsers,
            'can_restrict_members' => $canRestrictMembers,
            'can_pin_messages' => $canPinMessages,
            'can_promote_members' => $canPromoteMembers
        ]);
    }
public function promoteChatMember ( $ chatId , $ userId , $ canChangeInfo = true , $ canPostMessages = true , $ canEditMessages = true , $ canDeleteMessages = true , $ canInviteUsers = true , $ canRestrictMembers = true , $ canPinMessages = true , $ canPromoteMembers = true ) { return $ this -> call ( 'promoteChatMember' , [ 'chat_id' => $ chatId , 'user_id' => $ userId , 'can_change_info' => $ canChangeInfo , 'can_post_messages' => $ canPostMessages , 'can_edit_messages' => $ canEditMessages , 'can_delete_messages' => $ canDeleteMessages , 'can_invite_users' => $ canInviteUsers , 'can_restrict_members' => $ canRestrictMembers , 'can_pin_messages' => $ canPinMessages , 'can_promote_members' => $ canPromoteMembers ] ) ; }
Use this method to promote or demote a user in a supergroup or a channel.
The bot 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.

@param string|int $chatId Unique identifier for the target chat or username of the target supergroup
(in the format @supergroupusername)
@param int $userId Unique identifier of the target user
@param bool $canChangeInfo Pass True, if the administrator can change chat title, photo and other settings
@param bool $canPostMessages Pass True, if the administrator can create channel posts, channels only
@param bool $canEditMessages Pass True, if the administrator can edit messages of other users, channels only
@param bool $canDeleteMessages Pass True, if the administrator can delete messages of other users
@param bool $canInviteUsers Pass True, if the administrator can invite new users to the chat
@param bool $canRestrictMembers Pass True, if the administrator can restrict, ban or unban chat members
@param bool $canPinMessages Pass True, if the administrator can pin messages, supergroups only
@param bool $canPromoteMembers Pass True, if the administrator can add new administrators with a subset of his
own privileges or demote administrators that he has promoted,directly or
indirectly (promoted by administrators that were appointed by him)

@return bool
Use this method to promote or demote a user in a supergroup or a channel . The bot 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 .