Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PollChangeEvent

New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.

guides

Check official reference.

eventcategory

'postback'

eventtype

'poll_change'

Hierarchy

  • EventObject<"postback", "poll_change">
  • EventBase
  • PollChange
  • PollDetail
    • PollChangeEvent

Index

Properties

allowsMultipleAnswers: boolean

True, if the poll allows multiple answers

botId: number
category: "postback"
channel: null
closeDate?: number

Point in time (Unix timestamp) when the poll will be automatically closed

correctOptionId?: number

0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.

explanation?: string

Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters

explanationEntities?: any[]

Special entities like usernames, URLs, bot commands, etc. that appear in the explanation

isAnonymous: boolean

True, if the poll is anonymous

isClosed: boolean

True, if the poll is closed

openPeriod?: number

Amount of time in seconds the poll will be active after creation

options: any[]

List of poll options

platform: "telegram"
poll: any

Poll object.

pollId: string

Unique poll identifier

pollType: string

Poll type, currently can be “regular” or “quiz”

question: string

Poll question, 1-255 characters

totalVoterCount: number

Total number of users that voted in the poll

type: "poll_change"
updateId: string

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.

user: null

Generated using TypeDoc