sendVideo: Send a video

View source: R/bot.R

sendVideoR Documentation

Send a video

Description

Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).

Usage

sendVideo(
  chat_id,
  video,
  duration = NULL,
  caption = NULL,
  disable_notification = FALSE,
  reply_to_message_id = NULL,
  reply_markup = NULL,
  width = NULL,
  height = NULL,
  parse_mode = NULL,
  supports_streaming = NULL
)

Arguments

chat_id

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

video

Video file to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a local video file by passing a file path.

duration

(Optional). Duration of sent audio in seconds.

caption

(Optional). Video caption, 0-1024 characters.

disable_notification

(Optional). Sends the message silently. Users will receive a notification with no sound.

reply_to_message_id

(Optional). If the message is a reply, ID of the original message.

reply_markup

(Optional). A Reply Markup parameter object, it can be either:

  • ReplyKeyboardMarkup

  • InlineKeyboardMarkup

  • ReplyKeyboardRemove

  • ForceReply

width

(Optional). Video width.

height

(Optional). Video height.

parse_mode

(Optional). Send 'Markdown' or 'HTML', if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.

supports_streaming

(Optional). Pass TRUE, if the uploaded video is suitable for streaming.

Details

You can also use it's snake_case equivalent send_video.

Examples

## Not run: 
bot <- Bot(token = bot_token("RTelegramBot"))
chat_id <- user_id("Me")
video_url <- "http://techslides.com/demos/sample-videos/small.mp4"

bot$sendVideo(
  chat_id = chat_id,
  video = video_url
)

## End(Not run)

ebeneditos/telegram.bot documentation built on Sept. 12, 2022, 9:20 p.m.