public class Message
extends java.lang.Object
null).| Modifier and Type | Class and Description |
|---|---|
static class |
Message.Type
Defines the different types of Messages that can be received.
|
| Constructor and Description |
|---|
Message() |
| Modifier and Type | Method and Description |
|---|---|
Audio |
getAudio()
Optional.
|
java.lang.String |
getCaption()
Optional.
|
Chat |
getChat() |
Contact |
getContact()
Optional.
|
int |
getDate() |
Document |
getDocument()
Optional.
|
int |
getForwardDate()
Optional.
|
User |
getForwardFrom()
Optional.
|
User |
getFrom() |
User |
getLeftChatParticipant()
Optional.
|
Location |
getLocation()
Optional.
|
int |
getMessageId() |
User |
getNewChatParticipant()
Optional.
|
java.util.List<PhotoSize> |
getNewChatPhoto()
Optional.
|
java.lang.String |
getNewChatTitle()
Optional.
|
java.util.List<PhotoSize> |
getPhoto()
Optional.
|
Message |
getReplyToMessage()
Optional.
|
Sticker |
getSticker()
Optional.
|
java.lang.String |
getText()
Optional.
|
Message.Type |
getType()
Returns the
Message.Type of this Message. |
Video |
getVideo()
Optional.
|
Voice |
getVoice()
Optional.
|
boolean |
isDeleteChatPhoto()
Optional.
|
boolean |
isGroupChatCreated()
Optional.
|
java.lang.String |
toString() |
public int getMessageId()
public User getFrom()
public int getDate()
public Chat getChat()
public User getForwardFrom()
public int getForwardDate()
public Message getReplyToMessage()
public java.lang.String getText()
public Audio getAudio()
public Voice getVoice()
public Document getDocument()
public java.util.List<PhotoSize> getPhoto()
public Sticker getSticker()
public Video getVideo()
public Contact getContact()
public Location getLocation()
public User getNewChatParticipant()
public User getLeftChatParticipant()
public java.lang.String getNewChatTitle()
public java.util.List<PhotoSize> getNewChatPhoto()
public boolean isDeleteChatPhoto()
public boolean isGroupChatCreated()
public java.lang.String getCaption()
public Message.Type getType()
Message.Type of this Message.
This can be used to verify that a Message is the expected type.
For example, call getType() == Message.Type.Document first before calling getDocument().Type of this Messagepublic java.lang.String toString()
toString in class java.lang.Object