sendPoll: sendPoll

Description Usage Arguments

View source: R/TGBot.R

Description

Use this method to send a native poll.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sendPoll(
  question = NULL,
  options = NULL,
  is_anonymous = TRUE,
  type = c("regular", "quiz"),
  allows_multiple_answers = FALSE,
  correct_option_id = NULL,
  is_closed = FALSE,
  disable_notification = NULL,
  reply_to_message_id = NULL,
  chat_id = NULL
)

Arguments

question

Poll question, 1-255 characters

options

vector of possible answers: 2-10 strings 1-100 characters each

is_anonymous

if TRUE (default) the poll needs to be anonymous

type

poll type, 'quiz' or 'regular', defaults to 'regular'

allows_multiple_answers

if TRUE the poll allows multiple answers (default to FALSE and ignored for polls in quiz mode)

correct_option_id

0-based identifier of the correct answer option, required for polls in quiz mode (eg 0 set the first answer as correct)

is_closed

if TRUE the poll needs to be immediately closed. This can be useful for poll preview. (default to FALSE)

disable_notification

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

reply_to_message_id

If the message is a reply, ID of the original message

chat_id

Unique identifier for the target chat or username of the target channel (required)


lbraglia/telegram documentation built on June 28, 2021, 3:34 a.m.