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
: bigintId of the poll
closed
: boolean or undefinedWhether the poll is closed and doesn’t accept any more answers
publicVoters
: boolean or undefinedWhether cast votes are publicly visible to all users (non-anonymous poll)
multipleChoice
: boolean or undefinedWhether multiple options can be chosen as answer
quiz
: boolean or undefinedWhether this is a quiz (with wrong and correct answers, results shown in the return type)
question
: Raw.TypeTextWithEntitiesThe question of the poll (premium users only, only custom emoji entities are supported).
answers
: Array of Raw.TypePollAnswerThe possible answers, vote using messages.sendvote.
closePeriod
: number or undefinedAmount of time in seconds the poll will be active after creation, 5-600. can’t be used together with closeDate.
closeDate
: number or undefinedPoint 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.