public function restrictChatMember(
        $chatId,
        $userId,
        $untilDate = null,
        $canSendMessages = false,
        $canSendMediaMessages = false,
        $canSendOtherMessages = false,
        $canAddWebPagePreviews = false
    ) {
        return $this->call('restrictChatMember', [
            'chat_id' => $chatId,
            'user_id' => $userId,
            'until_date' => $untilDate,
            'can_send_messages' => $canSendMessages,
            'can_send_media_messages' => $canSendMediaMessages,
            'can_send_other_messages' => $canSendOtherMessages,
            'can_add_web_page_previews' => $canAddWebPagePreviews
        ]);
    }
public function restrictChatMember(
        $chatId,
        $userId,
        $untilDate = null,
        $canSendMessages = false,
        $canSendMediaMessages = false,
        $canSendOtherMessages = false,
        $canAddWebPagePreviews = false
    ) {
        return $this->call('restrictChatMember', [
            'chat_id' => $chatId,
            'user_id' => $userId,
            'until_date' => $untilDate,
            'can_send_messages' => $canSendMessages,
            'can_send_media_messages' => $canSendMediaMessages,
            'can_send_other_messages' => $canSendOtherMessages,
            'can_add_web_page_previews' => $canAddWebPagePreviews
        ]);
    }
public function restrictChatMember ( $ chatId , $ userId , $ untilDate = null , $ canSendMessages = false , $ canSendMediaMessages = false , $ canSendOtherMessages = false , $ canAddWebPagePreviews = false ) { return $ this -> call ( 'restrictChatMember' , [ 'chat_id' => $ chatId , 'user_id' => $ userId , 'until_date' => $ untilDate , 'can_send_messages' => $ canSendMessages , 'can_send_media_messages' => $ canSendMediaMessages , 'can_send_other_messages' => $ canSendOtherMessages , 'can_add_web_page_previews' => $ canAddWebPagePreviews ] ) ; }
Use this method to restrict a user in a supergroup.
The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights.
Pass True for all boolean parameters to lift restrictions from 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 null|integer $untilDate Date when restrictions will be lifted for the user, unix time.
If user is restricted for more than 366 days or less than 30 seconds from the current time,
they are considered to be restricted forever
@param bool $canSendMessages Pass True, if the user can send text messages, contacts, locations and venues
@param bool $canSendMediaMessages No Pass True, if the user can send audios, documents, photos, videos,
video notes and voice notes, implies can_send_messages
@param bool $canSendOtherMessages Pass True, if the user can send animations, games, stickers and
use inline bots, implies can_send_media_messages
@param bool $canAddWebPagePreviews Pass True, if the user may add web page previews to their messages,
implies can_send_media_messages

@return bool
Use this method to restrict a user in a supergroup . The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights . Pass True for all boolean parameters to lift restrictions from a user .