Learn R Programming

telegram.bot (version 2.0.0)

Bot: Bot

Description

This object represents a Telegram Bot.

Usage

Bot(token, base_url = NULL, base_file_url = NULL,
  request_config = NULL)

Arguments

token

Bot's unique authentication.

base_url

(Optional). Telegram Bot API service URL.

base_file_url

(Optional). Telegram Bot API file URL.

request_config

(Optional). Additional configuration settings to be passed to the bot's POST requests. See the config parameter from ?httr::POST for further details.

The request_config settings are very useful for the advanced users who would like to control the default timeouts and/or control the proxy used for http communication.

Format

An R6Class object.

API Methods

answerCallbackQuery

Send answers to callback queries sent from inline keyboard

answerInlineQuery

Send answers to an inline query

deleteMessage

Delete a message

deleteWebhook

Remove webhook integration

editMessageReplyMarkup

Edit the reply markup of a message

forwardMessage

Forward messages of any kind

getFile

Get info about a file and prepare it for downloading

getMe

Test your bot's auth token

getUpdates

Receive incoming updates

getUserProfilePhotos

Get a list of profile pictures for a user

getWebhookInfo

Get current webhook status

leaveChat

Leave a group, supergroup or channel

sendAnimation

Send animation files

sendAudio

Send audio files

sendChatAction

Tell the user that something is happening on the bot's side

sendDocument

Send general files

sendLocation

Send point on the map

sendMessage

Send text messages

sendPhoto

Send image files

sendSticker

Send .webp stickers

sendVideo

Send mp4 videos

sendVideoNote

Send videos messages

sendVoice

Send .ogg files encoded with OPUS

setWebhook

Receive incoming updates via an outgoing webhook

Other Methods

clean_updates

Clean any pending updates

set_token

Change your bot's auth token

Details

To take full advantage of this library take a look at Updater.

You can also use its methods snake_case equivalent.

Examples

Run this code
# NOT RUN {
bot <- Bot(token = 'TOKEN')
# }

Run the code above in your browser using DataLab