sendPoll | R Documentation |
Use this method to send a native poll.
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
)
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) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.