Class: TD::Types::InputMessageContent::Poll
- Inherits:
-
TD::Types::InputMessageContent
- Object
- Dry::Struct
- Base
- TD::Types::InputMessageContent
- TD::Types::InputMessageContent::Poll
- 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
-
#close_date ⇒ Integer
Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
-
#is_anonymous ⇒ Boolean
True, if the poll voters are anonymous.
-
#is_closed ⇒ Boolean
True, if the poll needs to be sent already closed; for bots only.
-
#open_period ⇒ Integer
Amount of time the poll will be active after creation, in seconds; for bots only.
-
#options ⇒ Array<TD::Types::FormattedText>
List of poll answer options, 2-10 strings 1-100 characters each.
-
#question ⇒ TD::Types::FormattedText
Poll question; 1-255 characters (up to 300 characters for bots).
-
#type ⇒ TD::Types::PollType
Type of the poll.
Method Summary
Methods inherited from Base
Instance Attribute Details
#close_date ⇒ Integer
Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def close_date @close_date end |
#is_anonymous ⇒ Boolean
True, if the poll voters are anonymous. Non-anonymous polls can’t be sent or forwarded to channels.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def is_anonymous @is_anonymous end |
#is_closed ⇒ Boolean
True, if the poll needs to be sent already closed; for bots only.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def is_closed @is_closed end |
#open_period ⇒ Integer
Amount of time the poll will be active after creation, in seconds; for bots only.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def open_period @open_period end |
#options ⇒ Array<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.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def end |
#question ⇒ TD::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.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def question @question end |
#type ⇒ TD::Types::PollType
Type of the poll.
17 18 19 |
# File 'lib/tdlib/types/input_message_content/poll.rb', line 17 def type @type end |