sendPoll: sendPoll

View source: R/TGBot.R

sendPollR Documentation

sendPoll

Description

Use this method to send a native poll.

Usage

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)


telegram documentation built on April 3, 2025, 8:53 p.m.