src/Api.php
public function sendChatAction(array $params)
    {
        $validActions = [
            'typing',
            'upload_photo',
            'record_video',
            'upload_video',
            'record_audio',
            'upload_audio',
            'upload_document',
            'find_location',
        ];

        if (isset($params['action']) && in_array($params['action'], $validActions)) {
            $this->post('sendChatAction', $params);

            return true;
        }

        throw new TelegramSDKException('Invalid Action! Accepted value: '.implode(', ', $validActions));
    }
public function sendChatAction(array $params)
    {
        $validActions = [
            'typing',
            'upload_photo',
            'record_video',
            'upload_video',
            'record_audio',
            'upload_audio',
            'upload_document',
            'find_location',
        ];

        if (isset($params['action']) && in_array($params['action'], $validActions)) {
            $this->post('sendChatAction', $params);

            return true;
        }

        throw new TelegramSDKException('Invalid Action! Accepted value: '.implode(', ', $validActions));
    }
public function sendChatAction ( array $ params ) { $ validActions = [ 'typing' , 'upload_photo' , 'record_video' , 'upload_video' , 'record_audio' , 'upload_audio' , 'upload_document' , 'find_location' , ] ; if ( isset ( $ params [ 'action' ] ) && in_array ( $ params [ 'action' ] , $ validActions ) ) { $ this -> post ( 'sendChatAction' , $ params ) ; return true ; } throw new TelegramSDKException ( 'Invalid Action! Accepted value: ' . implode ( ', ' , $ validActions ) ) ; }
Broadcast a Chat Action.

<code>
$params = [
'chat_id' => '',
'action'  => '',
];
</code>

@link https://core.telegram.org/bots/api#sendchataction

@param array    $params

@var int|string $params ['chat_id']
@var string     $params ['action']

@throws TelegramSDKException

@return bool
Broadcast a Chat Action .