TgKit library and website are still in early development!

Poll Class

extends Base

Contains information about a poll

Properties

allowsMultipleAnswers boolean

*true*, if the poll allows multiple answers

See the code

client Client

See the code

closeDate Date

Point in time when the poll will be automatically closed

See the code

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.

See the code

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

See the code

explanationEntities

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

See the code

id string

Unique poll identifier

See the code

isAnonymous boolean

*true*, if the poll is anonymous

See the code

isClosed boolean

*true*, if the poll is closed

See the code

openPeriod number

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

See the code

options

List of poll options

See the code

question string

Poll question

See the code

totalVoterCount number

Total number of users that voted in the poll

See the code

type PollType

Poll type

See the code