sendChatAction: Send a chat action

Description Usage Arguments Details Examples

View source: R/bot.R

Description

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).

Usage

1
sendChatAction(chat_id, action)

Arguments

chat_id

Unique identifier for the target chat or username of the target channel.

action

Type of action to broadcast. Choose one, depending on what the user is about to receive:

  • typing for text messages

  • upload_photo for photos

  • upload_video for videos

  • record_video for video recording

  • upload_audio for audio files

  • record_audio for audio file recording

  • upload_document for general files

  • find_location for location data

  • upload_video_note for video notes

  • record_video_note for video note recording

Details

You can also use it's snake_case equivalent send_chat_action.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
bot <- Bot(token = bot_token("RTelegramBot"))
chat_id <- user_id("Me")

bot$sendChatAction(
  chat_id = chat_id,
  action = "typing"
)

## End(Not run)

telegram.bot documentation built on Oct. 30, 2019, 9:40 a.m.