Constructors

Properties

_peers: PeersIndex
raw: RawPoll
results?: RawPollResults
type: "poll" = ...

Accessors

  • get answers(): readonly PollAnswer[]
  • List of answers in this poll

    Returns readonly PollAnswer[]

  • get id(): Long
  • Unique identifier of the poll

    Returns Long

  • get inputMedia(): TypeInputMedia
  • Input media TL object generated from this object, to be used inside InputMediaLike and TelegramClient.sendMedia

    A few notes:

    • Using this will result in an independent poll, which will not be auto-updated with the current.
    • If this is a quiz, a normal poll will be returned since the client does not know the correct answer.
    • This always returns a non-closed poll, even if the current poll was closed

    Returns TypeInputMedia

  • get isClosed(): boolean
  • Whether this poll is closed, i.e. does not accept votes anymore

    Returns boolean

  • get isMultiple(): boolean
  • Whether this poll accepts multiple answers

    Returns boolean

  • get isPublic(): boolean
  • Whether this poll is public, i.e. you list of voters is publicly available

    Returns boolean

  • get isQuiz(): boolean
  • Whether this is a quiz

    Returns boolean

  • get question(): string
  • Poll question

    Returns string

  • get questionEntities(): readonly MessageEntity[]
  • Format entities for question (currently may only contain custom emojis)

    Returns readonly MessageEntity[]

  • get solution(): null | string
  • Solution for the quiz, only available in case you have already answered

    Returns null | string

  • get solutionEntities(): null | readonly MessageEntity[]
  • Format entities for solution, only available in case you have already answered

    Returns null | readonly MessageEntity[]

  • get voters(): number
  • Total number of voters in this poll, if available

    Returns number