Raw.Poll

Raw.Poll

Poll

poll#58747131 id:long flags:# closed:flags.0?true public_voters:flags.1?true multiple_choice:flags.2?true quiz:flags.3?true question:TextWithEntities answers:Vector<PollAnswer> close_period:flags.4?int close_date:flags.5?int = Poll;
export namespace Raw {
  export class Poll {
    constructor(params: {
      id: bigint;
      closed?: boolean;
      publicVoters?: boolean;
      multipleChoice?: boolean;
      quiz?: boolean;
      question: Raw.TypeTextWithEntities;
      answers: Array<Raw.TypePollAnswer>;
      closePeriod?: number;
      closeDate?: number;
    }) {}
  }
}
🚫

This is a types constructor, you can’t use it as method when call invoke.

Layer: 185
Constructor ID: 0x58747131

Property

  • id : bigint

    Id of the poll

  • closed : boolean or undefined

    Whether the poll is closed and doesn’t accept any more answers

  • publicVoters : boolean or undefined

    Whether cast votes are publicly visible to all users (non-anonymous poll)

  • multipleChoice : boolean or undefined

    Whether multiple options can be chosen as answer

  • quiz : boolean or undefined

    Whether this is a quiz (with wrong and correct answers, results shown in the return type)

  • question : Raw.TypeTextWithEntities

    The question of the poll (premium users only, only custom emoji entities are supported).

  • answers : Array of Raw.TypePollAnswer

    The possible answers, vote using messages.sendvote.

  • closePeriod : number or undefined

    Amount of time in seconds the poll will be active after creation, 5-600. can’t be used together with closeDate.

  • closeDate : number or undefined

    Point in time (unix timestamp) when the poll will be automatically closed. must be at least 5 and no more than 600 seconds in the future; can’t be used together with closePeriod.