Class: TD::Types::InputMessageContent::Poll

Inherits:
TD::Types::InputMessageContent show all
Defined in:
lib/tdlib/types/input_message_content/poll.rb

Overview

A message with a poll. Polls can’t be sent to secret chats. Polls can be sent only to a private chat with a bot.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#close_dateInteger

Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.

Returns:

  • (Integer)

    the current value of close_date



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def close_date
  @close_date
end

#is_anonymousBoolean

True, if the poll voters are anonymous. Non-anonymous polls can’t be sent or forwarded to channels.

Returns:

  • (Boolean)

    the current value of is_anonymous



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def is_anonymous
  @is_anonymous
end

#is_closedBoolean

True, if the poll needs to be sent already closed; for bots only.

Returns:

  • (Boolean)

    the current value of is_closed



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def is_closed
  @is_closed
end

#open_periodInteger

Amount of time the poll will be active after creation, in seconds; for bots only.

Returns:

  • (Integer)

    the current value of open_period



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def open_period
  @open_period
end

#optionsArray<TD::Types::FormattedText>

List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users.

Returns:



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def options
  @options
end

#questionTD::Types::FormattedText

Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.

Returns:



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def question
  @question
end

#typeTD::Types::PollType

Type of the poll.

Returns:



17
18
19
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17

def type
  @type
end