sendSticker: Send a sticker

Description Usage Arguments Details Examples

View source: R/bot.R

Description

Use this method to send .webp stickers.

Usage

1
2
sendSticker(chat_id, sticker, disable_notification = FALSE,
  reply_to_message_id = NULL, reply_markup = NULL)

Arguments

chat_id

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

sticker

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

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

Details

You can also use it's snake_case equivalent send_sticker.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
bot <- Bot(token = bot_token("RTelegramBot"))
chat_id <- user_id("Me")
sticker_url <- "https://www.gstatic.com/webp/gallery/1.webp"

bot$sendSticker(
  chat_id = chat_id,
  sticker = sticker_url
)

## End(Not run)

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