class Hamilton::Types::PollOption

Overview

This object contains information about one answer option in a poll.

Included Modules

Defined in:

types/poll_option.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def added_by_chat : Hamilton::Types::Chat | Nil #

Chat that added the option; omitted if the option wasn't added by a chat after poll creation.


def added_by_chat=(added_by_chat : Hamilton::Types::Chat | Nil) #

Chat that added the option; omitted if the option wasn't added by a chat after poll creation.


def added_by_user : Hamilton::Types::User | Nil #

User who added the option; omitted if the option wasn't added by a user after poll creation.


def added_by_user=(added_by_user : Hamilton::Types::User | Nil) #

User who added the option; omitted if the option wasn't added by a user after poll creation.


def addition_date : Int32 | Nil #

Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll.


def addition_date=(addition_date : Int32 | Nil) #

Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def persistent_id : String #

Unique identifier of the option, persistent on option addition and deletion.


def persistent_id=(persistent_id : String) #

Unique identifier of the option, persistent on option addition and deletion.


def text : String #

Option text, 1-100 characters.


def text=(text : String) #

Option text, 1-100 characters.


def text_entities : Array(Hamilton::Types::MessageEntity) | Nil #

Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts


def text_entities=(text_entities : Array(Hamilton::Types::MessageEntity) | Nil) #

Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts


def voter_count : Int32 #

Number of users that voted for this option.


def voter_count=(voter_count : Int32) #

Number of users that voted for this option.