Package org.drinkless.tdlib

# Class TdApi.Message

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Message

Enclosing class:
  `TdApi`

public static class TdApi.Message extends TdApi.Object
Describes a message.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `String`
  `authorSignature`
  For channel posts and anonymous group messages, optional author signature.
  `double`
  `autoDeleteIn`
  Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never.
  `boolean`
  `canBeSaved`
  True, if content of the message can be saved locally.
  `long`
  `chatId`
  Chat identifier.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `boolean`
  `containsUnreadMention`
  True, if the message contains an unread mention for the current user.
  `boolean`
  `containsUnreadPollVotes`
  True, if the message is a poll message with unread votes.
  `TdApi.MessageContent`
  `content`
  Content of the message.
  `int`
  `date`
  Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.
  `int`
  `editDate`
  Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.
  `long`
  `effectId`
  Unique identifier of the effect added to the message; 0 if none.
  `TdApi.FactCheck`
  `factCheck`
  Information about fact-check added to the message; may be null if none.
  `TdApi.MessageForwardInfo`
  `forwardInfo`
  Information about the initial message sender; may be null if none or unknown.
  `TdApi.MessageSender`
  `guestBotCallerId`
  The identifier of the user or chat which used a guest bot to send the message; may be null if none.
  `boolean`
  `hasTimestampedMedia`
  True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
  `long`
  `id`
  Message identifier; unique for the chat to which the message belongs.
  `TdApi.MessageImportInfo`
  `importInfo`
  Information about the initial message for messages created with importMessages; may be null if the message isn't imported.
  `TdApi.MessageInteractionInfo`
  `interactionInfo`
  Information about interactions with the message; may be null if none.
  `boolean`
  `isChannelPost`
  True, if the message is a channel post.
  `boolean`
  `isFromOffline`
  True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.
  `boolean`
  `isOutgoing`
  True, if the message is outgoing.
  `boolean`
  `isPaidStarSuggestedPost`
  True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.
  `boolean`
  `isPaidTonSuggestedPost`
  True, if the message is a suggested channel post which was paid in Toncoins; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.
  `boolean`
  `isPinned`
  True, if the message is pinned.
  `long`
  `mediaAlbumId`
  Unique identifier of an album this message belongs to; 0 if none.
  `long`
  `paidMessageStarCount`
  The number of Telegram Stars the sender paid to send the message.
  `TdApi.ReplyMarkup`
  `replyMarkup`
  Reply markup for the message; may be null if none.
  `TdApi.MessageReplyTo`
  `replyTo`
  Information about the message or the story this message is replying to; may be null if none.
  `TdApi.RestrictionInfo`
  `restrictionInfo`
  Information about the restrictions that must be applied to the message content; may be null if none.
  `TdApi.MessageSchedulingState`
  `schedulingState`
  The scheduling state of the message; may be null if the message isn't scheduled.
  `double`
  `selfDestructIn`
  Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.
  `TdApi.MessageSelfDestructType`
  `selfDestructType`
  The message's self-destruct type; may be null if none.
  `int`
  `senderBoostCount`
  Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown.
  `long`
  `senderBusinessBotUserId`
  If non-zero, the user identifier of the business bot that sent this message.
  `TdApi.MessageSender`
  `senderId`
  Identifier of the sender of the message.
  `String`
  `senderTag`
  Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown.
  `TdApi.MessageSendingState`
  `sendingState`
  The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
  `TdApi.SuggestedPostInfo`
  `suggestedPostInfo`
  Information about the suggested post; may be null if the message isn't a suggested post.
  `String`
  `summaryLanguageCode`
  IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message.
  `TdApi.MessageTopic`
  `topicId`
  Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back.
  `TdApi.UnreadReaction[]`
  `unreadReactions`
  Information about unread reactions added to the message.
  `long`
  `viaBotUserId`
  If non-zero, the user identifier of the inline bot through which this message was sent.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Message()`
  Describes a message.
  `Message(long id, TdApi.MessageSender senderId, long chatId, TdApi.MessageSendingState sendingState, TdApi.MessageSchedulingState schedulingState, boolean isOutgoing, boolean isPinned, boolean isFromOffline, boolean canBeSaved, boolean hasTimestampedMedia, boolean isChannelPost, boolean isPaidStarSuggestedPost, boolean isPaidTonSuggestedPost, boolean containsUnreadMention, boolean containsUnreadPollVotes, int date, int editDate, TdApi.MessageForwardInfo forwardInfo, TdApi.MessageImportInfo importInfo, TdApi.MessageInteractionInfo interactionInfo, TdApi.UnreadReaction[] unreadReactions, TdApi.FactCheck factCheck, TdApi.SuggestedPostInfo suggestedPostInfo, TdApi.MessageReplyTo replyTo, TdApi.MessageTopic topicId, TdApi.MessageSelfDestructType selfDestructType, double selfDestructIn, double autoDeleteIn, long viaBotUserId, TdApi.MessageSender guestBotCallerId, long senderBusinessBotUserId, int senderBoostCount, String senderTag, long paidMessageStarCount, String authorSignature, long mediaAlbumId, long effectId, TdApi.RestrictionInfo restrictionInfo, String summaryLanguageCode, TdApi.MessageContent content, TdApi.ReplyMarkup replyMarkup)`
  Describes a message.

- ## 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

  - ### id

    public long id
    Message identifier; unique for the chat to which the message belongs.

  - ### senderId

    public TdApi.MessageSender senderId
    Identifier of the sender of the message.

  - ### chatId

    public long chatId
    Chat identifier.

  - ### sendingState

    @Nullable public TdApi.MessageSendingState sendingState
    The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.

  - ### schedulingState

    @Nullable public TdApi.MessageSchedulingState schedulingState
    The scheduling state of the message; may be null if the message isn't scheduled.

  - ### isOutgoing

    public boolean isOutgoing
    True, if the message is outgoing.

  - ### isPinned

    public boolean isPinned
    True, if the message is pinned.

  - ### isFromOffline

    public boolean isFromOffline
    True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.

  - ### canBeSaved

    public boolean canBeSaved
    True, if content of the message can be saved locally.

  - ### hasTimestampedMedia

    public boolean hasTimestampedMedia
    True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.

  - ### isChannelPost

    public boolean isChannelPost
    True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.

  - ### isPaidStarSuggestedPost

    public boolean isPaidStarSuggestedPost
    True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.

  - ### isPaidTonSuggestedPost

    public boolean isPaidTonSuggestedPost
    True, if the message is a suggested channel post which was paid in Toncoins; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.

  - ### containsUnreadMention

    public boolean containsUnreadMention
    True, if the message contains an unread mention for the current user.

  - ### containsUnreadPollVotes

    public boolean containsUnreadPollVotes
    True, if the message is a poll message with unread votes.

  - ### date

    public int date
    Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.

  - ### editDate

    public int editDate
    Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.

  - ### forwardInfo

    @Nullable public TdApi.MessageForwardInfo forwardInfo
    Information about the initial message sender; may be null if none or unknown.

  - ### importInfo

    @Nullable public TdApi.MessageImportInfo importInfo
    Information about the initial message for messages created with importMessages; may be null if the message isn't imported.

  - ### interactionInfo

    @Nullable public TdApi.MessageInteractionInfo interactionInfo
    Information about interactions with the message; may be null if none.

  - ### unreadReactions

    public TdApi.UnreadReaction[] unreadReactions
    Information about unread reactions added to the message.

  - ### factCheck

    @Nullable public TdApi.FactCheck factCheck
    Information about fact-check added to the message; may be null if none.

  - ### suggestedPostInfo

    @Nullable public TdApi.SuggestedPostInfo suggestedPostInfo
    Information about the suggested post; may be null if the message isn't a suggested post.

  - ### replyTo

    @Nullable public TdApi.MessageReplyTo replyTo
    Information about the message or the story this message is replying to; may be null if none.

  - ### topicId

    @Nullable public TdApi.MessageTopic topicId
    Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back.

  - ### selfDestructType

    @Nullable public TdApi.MessageSelfDestructType selfDestructType
    The message's self-destruct type; may be null if none.

  - ### selfDestructIn

    public double selfDestructIn
    Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.

  - ### autoDeleteIn

    public double autoDeleteIn
    Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never.

  - ### viaBotUserId

    public long viaBotUserId
    If non-zero, the user identifier of the inline bot through which this message was sent.

  - ### guestBotCallerId

    @Nullable public TdApi.MessageSender guestBotCallerId
    The identifier of the user or chat which used a guest bot to send the message; may be null if none.

  - ### senderBusinessBotUserId

    public long senderBusinessBotUserId
    If non-zero, the user identifier of the business bot that sent this message.

  - ### senderBoostCount

    public int senderBoostCount
    Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.myBoostCount must be used instead.

  - ### senderTag

    public String senderTag
    Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead.

  - ### paidMessageStarCount

    public long paidMessageStarCount
    The number of Telegram Stars the sender paid to send the message.

  - ### authorSignature

    public String authorSignature
    For channel posts and anonymous group messages, optional author signature.

  - ### mediaAlbumId

    public long mediaAlbumId
    Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.

  - ### effectId

    public long effectId
    Unique identifier of the effect added to the message; 0 if none.

  - ### restrictionInfo

    @Nullable public TdApi.RestrictionInfo restrictionInfo
    Information about the restrictions that must be applied to the message content; may be null if none.

  - ### summaryLanguageCode

    public String summaryLanguageCode
    IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message.

  - ### content

    public TdApi.MessageContent content
    Content of the message.

  - ### replyMarkup

    @Nullable public TdApi.ReplyMarkup replyMarkup
    Reply markup for the message; may be null if none.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### Message

    public Message()
    Describes a message.

  - ### Message

    public Message(long id, TdApi.MessageSender senderId, long chatId, TdApi.MessageSendingState sendingState, TdApi.MessageSchedulingState schedulingState, boolean isOutgoing, boolean isPinned, boolean isFromOffline, boolean canBeSaved, boolean hasTimestampedMedia, boolean isChannelPost, boolean isPaidStarSuggestedPost, boolean isPaidTonSuggestedPost, boolean containsUnreadMention, boolean containsUnreadPollVotes, int date, int editDate, TdApi.MessageForwardInfo forwardInfo, TdApi.MessageImportInfo importInfo, TdApi.MessageInteractionInfo interactionInfo, TdApi.UnreadReaction[] unreadReactions, TdApi.FactCheck factCheck, TdApi.SuggestedPostInfo suggestedPostInfo, TdApi.MessageReplyTo replyTo, TdApi.MessageTopic topicId, TdApi.MessageSelfDestructType selfDestructType, double selfDestructIn, double autoDeleteIn, long viaBotUserId, TdApi.MessageSender guestBotCallerId, long senderBusinessBotUserId, int senderBoostCount, String senderTag, long paidMessageStarCount, String authorSignature, long mediaAlbumId, long effectId, TdApi.RestrictionInfo restrictionInfo, String summaryLanguageCode, TdApi.MessageContent content, TdApi.ReplyMarkup replyMarkup)
    Describes a message.
    Parameters:
      `id` - Message identifier; unique for the chat to which the message belongs.
      `senderId` - Identifier of the sender of the message.
      `chatId` - Chat identifier.
      `sendingState` - The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
      `schedulingState` - The scheduling state of the message; may be null if the message isn't scheduled.
      `isOutgoing` - True, if the message is outgoing.
      `isPinned` - True, if the message is pinned.
      `isFromOffline` - True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.
      `canBeSaved` - True, if content of the message can be saved locally.
      `hasTimestampedMedia` - True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
      `isChannelPost` - True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
      `isPaidStarSuggestedPost` - True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.
      `isPaidTonSuggestedPost` - True, if the message is a suggested channel post which was paid in Toncoins; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending.
      `containsUnreadMention` - True, if the message contains an unread mention for the current user.
      `containsUnreadPollVotes` - True, if the message is a poll message with unread votes.
      `date` - Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.
      `editDate` - Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.
      `forwardInfo` - Information about the initial message sender; may be null if none or unknown.
      `importInfo` - Information about the initial message for messages created with importMessages; may be null if the message isn't imported.
      `interactionInfo` - Information about interactions with the message; may be null if none.
      `unreadReactions` - Information about unread reactions added to the message.
      `factCheck` - Information about fact-check added to the message; may be null if none.
      `suggestedPostInfo` - Information about the suggested post; may be null if the message isn't a suggested post.
      `replyTo` - Information about the message or the story this message is replying to; may be null if none.
      `topicId` - Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back.
      `selfDestructType` - The message's self-destruct type; may be null if none.
      `selfDestructIn` - Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.
      `autoDeleteIn` - Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never.
      `viaBotUserId` - If non-zero, the user identifier of the inline bot through which this message was sent.
      `guestBotCallerId` - The identifier of the user or chat which used a guest bot to send the message; may be null if none.
      `senderBusinessBotUserId` - If non-zero, the user identifier of the business bot that sent this message.
      `senderBoostCount` - Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.myBoostCount must be used instead.
      `senderTag` - Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead.
      `paidMessageStarCount` - The number of Telegram Stars the sender paid to send the message.
      `authorSignature` - For channel posts and anonymous group messages, optional author signature.
      `mediaAlbumId` - Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.
      `effectId` - Unique identifier of the effect added to the message; 0 if none.
      `restrictionInfo` - Information about the restrictions that must be applied to the message content; may be null if none.
      `summaryLanguageCode` - IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message.
      `content` - Content of the message.
      `replyMarkup` - Reply markup for the message; may be null if none.

- ## 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.Object`
    Returns:
      this.CONSTRUCTOR