Skip to content

sendChatAction

Sahri Riza Umami edited this page Dec 8, 2016 · 5 revisions

Sends notification about user activity in a chat.

sendChatAction(chat_id, action, progress)
Option Description
chat_id Chat identifier.
action Action description. The actions are Typing, Cancel, RecordVideo, UploadVideo, RecordVoice, UploadVoice, UploadPhoto, UploadDocument, GeoLocation, ChooseContact, and StartPlayGame.
progress Upload progress in percents.

Example

  • ser typing message.
sendChatAction(1234567890, 'Typing')
  • User cancels typing.
sendChatAction(1234567890, 'Cancel')
  • User records a video.
sendChatAction(1234567890, 'RecordVideo')
  • User uploads a video.
sendChatAction(1234567890, 'UploadVideo', 100)
  • User records voice message.
sendChatAction(1234567890, 'RecordVoice')
  • User uploads voice message.
sendChatAction(1234567890, 'UploadVoice', 100)
  • User uploads a photo.
sendChatAction(1234567890, 'UploadPhoto', 100)
  • User uploads a document.
sendChatAction(1234567890, 'UploadDocument', 100)
  • User sends geolocation.
sendChatAction(1234567890, 'GeoLocation')
  • User chooses contact to send.
sendChatAction(1234567890, 'ChooseContact')
  • User starts to play a game.
sendChatAction(1234567890, 'StartPlayGame')

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally