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 be automatically closed; for bots only.

Returns:

  • (Integer)

    the current value of close_date



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

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



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

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



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

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



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

def open_period
  @open_period
end

#optionsArray<TD::Types::String>

List of poll answer options, 2-10 strings 1-100 characters each.

Returns:

  • (Array<TD::Types::String>)

    the current value of options



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

def options
  @options
end

#questionTD::Types::String

Poll question; 1-255 characters (up to 300 characters for bots).

Returns:

  • (TD::Types::String)

    the current value of question



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

def question
  @question
end

#typeTD::Types::PollType

Type of the poll.

Returns:



15
16
17
# File 'lib/tdlib/types/input_message_content/poll.rb', line 15

def type
  @type
end