Poll

class Poll

Class representing a poll.

A poll instance can be created using Poll.create with PollCreateParams and updated using GroupChannel.updatePoll with PollUpdateParams class. A poll can be attached to a message using UserMessageCreateParams.pollId.

Since

4.1.0

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

True if this poll allows multiple votes, false otherwise.

Link copied to clipboard

True if this poll allows user suggestion, false otherwise.

Link copied to clipboard

Unix timestamp at which the poll has closed or will close. (second precision) If poll closing time is not specified, this value will be -1.

Link copied to clipboard

Unix timestamp at which the poll is created.

Link copied to clipboard

UserId of the poll creator. null if the creator account is removed.

Link copied to clipboard

An additional json data to accompany the poll.

Link copied to clipboard
val id: Long

A unique identifier for this poll.

Link copied to clipboard

A id of the message that contains this poll

Link copied to clipboard

Options for this poll.

Link copied to clipboard

Indicates whether this poll is PollStatus.OPEN, or PollStatus.CLOSED

Link copied to clipboard

Title of the poll.

Link copied to clipboard

Unix timestamp at which the poll is updated.

Link copied to clipboard

Contains optionIds which the current user voted on. If the current user has not voted, this list will be empty.

Link copied to clipboard

Total voter count.

Functions

Link copied to clipboard

Applies poll update event to this user message's poll.

Link copied to clipboard

Applies poll vote event to this user message's poll.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Serializes the Poll instance. This byte array can be stored in the database in your application. The instance can be restored by buildFromSerializedData.

Link copied to clipboard
open override fun toString(): String