Protected
_clientProtected
_sourceGets the ID of the correct answer option, if specified.
Gets the text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, if specified.
Gets the entities that appear in the explanation text, if specified.
Gets the ID of the poll.
Returns true if the poll is anonymous.
Returns true if the poll is closed.
Gets the amount of time in seconds the poll will be active after creation, if specified.
Gets the list of poll options.
Gets the question text of the poll.
Gets the total number of users that voted in the poll.
Gets the type of the poll.
This method searches for a poll option with the given text among all the options in the poll.
Parameter specifies the text to search for.
The found poll option.
Returns the percentage of votes for the transmitted option
Poll option from which to calculate the percentage
Percentage of those who voted for option
Converts the source object to a context object of a given type.
client.updates.on("message", message => {
const user = message.user.toContext<CustomUserContext>();
// Now user works correctly with your context
})
Generic type parameter for the context object.
The context object.
Generated using TypeDoc
Returns true if the poll allows multiple answers.