class

Tourmaline::PollAnswer

Inherits JSON::Serializable < Reference < Object

This object represents an answer of a user in a non-anonymous poll.

Constructors

new(poll_id : String, option_ids : Array(Int32 | Int64) = [] of Int32 | Int64, voter_chat : Tourmaline::Chat | Nil = nil, user : Tourmaline::User | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

option_ids

0-based identifiers of chosen answer options. May be empty if the vote was retracted.

Source
option_ids=(option_ids : Array(Int32 | Int64))

0-based identifiers of chosen answer options. May be empty if the vote was retracted.

Source
poll_id

Unique poll identifier

Source
poll_id=(poll_id : String)

Unique poll identifier

Source
user

Optional. The user that changed the answer to the poll, if the voter isn't anonymous

Source
user=(user : Tourmaline::User | Nil)

Optional. The user that changed the answer to the poll, if the voter isn't anonymous

Source
voter_chat

Optional. The chat that changed the answer to the poll, if the voter is anonymous

Source
voter_chat=(voter_chat : Tourmaline::Chat | Nil)

Optional. The chat that changed the answer to the poll, if the voter is anonymous

Source