java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.InputMessageContent
it.tdlight.jni.TdApi.InputMessagePoll
- Enclosing class:
- TdApi
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.
-
Field Summary
Modifier and TypeFieldDescriptionint
Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.static final int
boolean
True, if the poll voters are anonymous.boolean
True, if the poll needs to be sent already closed; for bots only.int
Amount of time the poll will be active after creation, in seconds; for bots only.String[]
List of poll answer options, 2-10 strings 1-100 characters each.Poll question; 1-255 characters (up to 300 characters for bots).Type of the poll. -
Constructor Summary
ConstructorDescriptionA message with a poll.InputMessagePoll
(DataInput input) A message with a poll.InputMessagePoll
(String question, String[] options, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed) A message with a poll. -
Method Summary
Methods inherited from class it.tdlight.jni.TdApi.Object
serialize, toString
-
Field Details
-
question
Poll question; 1-255 characters (up to 300 characters for bots). -
options
List of poll answer options, 2-10 strings 1-100 characters each. -
isAnonymous
public boolean isAnonymousTrue, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels. -
type
Type of the poll. -
openPeriod
public int openPeriodAmount of time the poll will be active after creation, in seconds; for bots only. -
closeDate
public int closeDatePoint in time (Unix timestamp) when the poll will automatically be closed; for bots only. -
isClosed
public boolean isClosedTrue, if the poll needs to be sent already closed; for bots only. -
CONSTRUCTOR
public static final int CONSTRUCTOR- See Also:
-
-
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(String question, String[] 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
- String Poll question; 1-255 characters (up to 300 characters for bots).options
- String[] List of poll answer options, 2-10 strings 1-100 characters each.isAnonymous
- boolean True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.type
- PollType Type of the poll.openPeriod
- int Amount of time the poll will be active after creation, in seconds; for bots only.closeDate
- int Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.isClosed
- boolean True, if the poll needs to be sent already closed; for bots only.
-
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.- Throws:
IOException
-
-
Method Details
-
getConstructor
public int getConstructor()- Specified by:
getConstructor
in classTdApi.Object
-
serialize
- Specified by:
serialize
in classTdApi.Object
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-