Package org.drinkless.tdlib

# Class TdApi.InputMessagePoll

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.InputMessageContent
org.drinkless.tdlib.TdApi.InputMessagePoll

Enclosing class:
  TdApi

public static class TdApi.InputMessagePoll extends TdApi.InputMessageContent
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.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.InputMessageContent

  `TdApi.InputMessageContent.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `closeDate`
  Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `boolean`
  `isAnonymous`
  True, if the poll voters are anonymous.
  `boolean`
  `isClosed`
  True, if the poll needs to be sent already closed; for bots only.
  `int`
  `openPeriod`
  Amount of time the poll will be active after creation, in seconds; for bots only.
  `TdApi.FormattedText[]`
  `options`
  List of poll answer options, 2-10 strings 1-100 characters each.
  `TdApi.FormattedText`
  `question`
  Poll question; 1-255 characters (up to 300 characters for bots).
  `TdApi.PollType`
  `type`
  Type of the poll.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InputMessagePoll()`
  A message with a poll.
  `InputMessagePoll(TdApi.FormattedText question, TdApi.FormattedText[] options, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)`
  A message with a poll.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### question

    public TdApi.FormattedText question
    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.

  - ### options

    public TdApi.FormattedText[] options
    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.

  - ### isAnonymous

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

  - ### type

    public TdApi.PollType type
    Type of the poll.

  - ### openPeriod

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

  - ### closeDate

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

  - ### isClosed

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

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### InputMessagePoll

    public InputMessagePoll()
    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.

  - ### InputMessagePoll

    public InputMessagePoll(TdApi.FormattedText question, TdApi.FormattedText[] options, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)
    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.
    Parameters:
      `question` - 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.
      `options` - 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.
      `isAnonymous` - True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
      `type` - Type of the poll.
      `openPeriod` - Amount of time the poll will be active after creation, in seconds; for bots only.
      `closeDate` - Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
      `isClosed` - True, if the poll needs to be sent already closed; for bots only.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.InputMessageContent`
    Returns:
      this.CONSTRUCTOR