java.lang.Object
io.github.natanimn.telebof.types.updates.Message
All Implemented Interfaces:
TelegramUpdate

public class Message extends Object implements TelegramUpdate
This object represents a message.
Since:
3 March 2025
Author:
Natanim
  • Field Details

    • messageId

      @SerializedName("message_id") private Integer messageId
      Unique message identifier inside this chat
    • messageThreadId

      @SerializedName("message_thread_id") private Integer messageThreadId
      Unique identifier of a message thread to which the message belongs; for supergroups only
    • date

      private Integer date
      Date the message was sent in Unix time
    • editDate

      @SerializedName("edit_date") private Integer editDate
      Date the message was last edited in Unix time
    • migrateToChatId

      @SerializedName("migrate_to_chat_id") private Long migrateToChatId
      The group has been migrated to a supergroup with the specified identifier
    • migrateFromChatId

      @SerializedName("migrate_from_chat_id") private Long migrateFromChatId
      The supergroup has been migrated from a group with the specified identifier
    • authorSignature

      @SerializedName("author_signature") private String authorSignature
      Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
    • text

      private String text
      For text messages, the actual UTF-8 text of the message
    • caption

      private String caption
      Caption for the animation, audio, document, paid media, photo, video or voice
    • newChatTitle

      @SerializedName("new_chat_title") private String newChatTitle
      A chat title was changed to this value
    • connectedWebsite

      @SerializedName("connected_website") private String connectedWebsite
      The domain name of the website on which the user has logged in
    • mediaGroupId

      @SerializedName("media_group_id") private String mediaGroupId
      The unique identifier of a media message group this message belongs to
    • businessConnectionId

      @SerializedName("business_connection_id") private String businessConnectionId
      Unique identifier of the business connection from which the message was received
    • from

      private User from
      Sender of the message; may be empty for messages sent to channels
    • viaBot

      @SerializedName("via_bot") private User viaBot
      Bot through which the message was sent
    • leftChatMember

      @SerializedName("left_chat_member") private User leftChatMember
      A member was removed from the group, information about them (this member may be the bot itself)
    • senderBusinessBot

      @SerializedName("sender_business_bot") private User senderBusinessBot
      The bot that actually sent the message on behalf of the business account
    • newChatMembers

      @SerializedName("new_chat_members") private List<User> newChatMembers
      New members that were added to the group or supergroup and information about them
    • senderChat

      @SerializedName("sender_chat") private Chat senderChat
      Sender of the message when sent on behalf of a chat
    • chat

      private Chat chat
      Chat the message belongs to
    • isTopicMessage

      @SerializedName("is_topic_message") private Boolean isTopicMessage
      True, if the message is sent to a forum topic
    • isAutomaticForward

      @SerializedName("is_automatic_forward") private Boolean isAutomaticForward
      True, if the message is a channel post that was automatically forwarded to the connected discussion group
    • hasProtectedContent

      @SerializedName("has_protected_content") private Boolean hasProtectedContent
      True, if the message can't be forwarded
    • isFromOnline

      @SerializedName("is_from_online") private Boolean isFromOnline
      True, if the message was sent by an implicit action
    • hasMediaSpoiler

      @SerializedName("has_media_spoiler") private Boolean hasMediaSpoiler
      True, if the message media is covered by a spoiler animation
    • deleteChatPhoto

      @SerializedName("delete_chat_photo") private Boolean deleteChatPhoto
      Service message: the chat photo was deleted
    • groupChatCreated

      @SerializedName("group_chat_created") private Boolean groupChatCreated
      Service message: the group has been created
    • supergroupChatCreated

      @SerializedName("supergroup_chat_created") private Boolean supergroupChatCreated
      Service message: the supergroup has been created
    • channelChatCreated

      @SerializedName("channel_chat_created") private Boolean channelChatCreated
      Service message: the channel has been created
    • replyToMessage

      @SerializedName("reply_to_message") private Message replyToMessage
      For replies in the same chat and message thread, the original message
    • pinnedMessage

      @SerializedName("pinned_message") private Message pinnedMessage
      Specified message was pinned
    • entities

      private List<MessageEntity> entities
      For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
    • captionEntities

      @SerializedName("caption_entities") private List<MessageEntity> captionEntities
      For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
    • animation

      private Animation animation
      Message is an animation, information about the animation
    • audio

      private Audio audio
      Message is an audio file, information about the file
    • document

      private Document document
      Message is a general file, information about the file
    • photo

      private List<PhotoSize> photo
      Message is a photo, available sizes of the photo
    • newChatPhoto

      @SerializedName("new_chat_photo") private List<PhotoSize> newChatPhoto
      A chat photo was change to this value
    • sticker

      private Sticker sticker
      Message is a sticker, information about the sticker
    • video

      private Video video
      Message is a video, information about the video
    • videoNote

      @SerializedName("video_note") private VideoNote videoNote
      Message is a video note, information about the video message
    • voice

      private Voice voice
      Message is a voice message, information about the file
    • contact

      private Contact contact
      Message is a shared contact, information about the contact
    • dice

      private Dice dice
      Message is a dice with random value
    • game

      private Game game
      Message is a game, information about the game
    • poll

      private Poll poll
      Message is a native poll, information about the poll
    • story

      private Story story
      Message is a forwarded story
    • venue

      private Venue venue
      Message is a venue, information about the venue
    • location

      private Location location
      Message is a shared location, information about the location
    • messageAutoDeleteTimerChanged

      @SerializedName("message_auto_delete_timer_changed") private MessageAutoDeleteTimerChanged messageAutoDeleteTimerChanged
      Service message: auto-delete timer settings changed in the chat
    • invoice

      private Invoice invoice
      Message is an invoice for a payment, information about the invoice
    • successfulPayment

      @SerializedName("successful_payment") private SuccessfulPayment successfulPayment
      Message is a service message about a successful payment, information about the payment
    • usersShared

      @SerializedName("users_shared") private UsersShared usersShared
      Service message: users were shared with the bot
    • chatShared

      @SerializedName("chat_shared") private ChatShared chatShared
      Service message: a chat was shared with the bot
    • writeAccessAllowed

      @SerializedName("write_access_allowed") private WriteAccessAllowed writeAccessAllowed
      Service message: the user allowed the bot to write messages
    • passportData

      @SerializedName("passport_data") private PassportData passportData
      Telegram Passport data
    • proximityAlertTriggered

      @SerializedName("proximity_alert_triggered") private ProximityAlertTriggered proximityAlertTriggered
      Service message: A user in the chat triggered another user's proximity alert while sharing Live Location
    • forumTopicCreated

      @SerializedName("forum_topic_created") private ForumTopicCreated forumTopicCreated
      Service message: forum topic created
    • forumTopicEdited

      @SerializedName("forum_topic_edited") private ForumTopicEdited forumTopicEdited
      Service message: forum topic edited
    • forumTopicClosed

      @SerializedName("forum_topic_closed") private ForumTopicClosed forumTopicClosed
      Service message: forum topic closed
    • forumTopicReopened

      @SerializedName("forum_topic_reopened") private ForumTopicReopened forumTopicReopened
      Service message: forum topic reopened
    • generalForumTopicHidden

      @SerializedName("general_forum_topic_hidden") private GeneralForumTopicHidden generalForumTopicHidden
      Service message: the 'General' forum topic hidden
    • generalForumTopicUnhidden

      @SerializedName("general_forum_topic_unhidden") private GeneralForumTopicUnhidden generalForumTopicUnhidden
      Service message: the 'General' forum topic unhidden
    • videoChatScheduled

      @SerializedName("video_chat_scheduled") private VideoChatScheduled videoChatScheduled
      Service message: video chat scheduled
    • videoChatStarted

      @SerializedName("video_chat_started") private VideoChatStarted videoChatStarted
      Service message: video chat started
    • videoChatEnded

      @SerializedName("video_chat_ended") private VideoChatEnded videoChatEnded
      Service message: video chat ended
    • videoChatParticipantsInvited

      @SerializedName("video_chat_participants_invited") private VideoChatParticipantsInvited videoChatParticipantsInvited
      Service message: new participants invited to a video chat
    • webAppData

      @SerializedName("web_app_data") private WebAppData webAppData
      Service message: data sent by a Web App
    • replyMarkup

      @SerializedName("reply_markup") private InlineKeyboardMarkup replyMarkup
      Inline keyboard attached to the message
    • externalReply

      @SerializedName("external_reply") private ExternalReplyInfo externalReply
      Information about the message that is being replied to, which may come from another chat or forum topic
    • quote

      private TextQuote quote
      For replies that quote part of the original message, the quoted part of the message
    • linkPreviewOptions

      @SerializedName("link_preview_options") private LinkPreviewOptions linkPreviewOptions
      Options used for link preview generation for the message
    • giveaway

      private Giveaway giveaway
      The message is a scheduled giveaway message
    • giveawayCreated

      @SerializedName("giveaway_created") private GiveawayCreated giveawayCreated
      Service message: a scheduled giveaway was created
    • giveawayWinners

      @SerializedName("giveaway_winners") private GiveawayWinners giveawayWinners
      A giveaway with public winners was completed
    • giveawayCompleted

      @SerializedName("giveaway_completed") private GiveawayCompleted giveawayCompleted
      Service message: a giveaway without public winners was completed
    • forwardOrigin

      @SerializedName("forward_origin") private MessageOrigin forwardOrigin
      Information about the original message for forwarded messages
    • boostAdded

      @SerializedName("boost_added") private ChatBoostAdded boostAdded
      Service message: user boosted the chat
    • senderBoostCount

      @SerializedName("sender_boost_count") private Integer senderBoostCount
      If the sender of the message boosted the chat, the number of boosts added by the user
    • replyToStory

      @SerializedName("reply_to_story") private Story replyToStory
      For replies to a story, the original story
    • chatBackgroundSet

      @SerializedName("chat_background_set") private ChatBackground chatBackgroundSet
      Service message: chat background set
    • effectId

      @SerializedName("effect_id") private String effectId
      Unique identifier of the message effect added to the message
    • showCaptionAboveMedia

      @SerializedName("show_caption_above_media") private Boolean showCaptionAboveMedia
      True, if the caption must be shown above the message media
    • paidMedia

      @SerializedName("paid_media") private PaidMediaInfo paidMedia
      Message is a general file, information about the file
    • refundedPayment

      @SerializedName("refunded_payment") private RefundedPayment refundedPayment
      Message is a service message about a refunded payment, information about the payment
    • gift

      private GiftInfo gift
      Optional. Service message: a regular gift was sent or received
    • uniqueGift

      @SerializedName("unique_gift") private UniqueGift uniqueGift
      Optional. Service message: a unique gift was sent or received
    • paidMessagePriceChanged

      @SerializedName("paid_message_price_changed") private PaidMessagePriceChanged paidMessagePriceChanged
      Optional. Service message: the price for paid messages has changed in the chat
    • paidStarCount

      @SerializedName("paid_star_count") private Integer paidStarCount
      Optional. The number of Telegram Stars that were paid by the sender of the message to send it
    • checklist

      private Checklist checklist
      Optional. Message is a checklist
    • checklistTasksDone

      @SerializedName("checklist_tasks_done") private ChecklistTasksAdded checklistTasksDone
      Optional. Service message: some tasks in a checklist were marked as done or not done
    • checklistTasksAdded

      @SerializedName("checklist_tasks_added") private ChecklistTasksDone checklistTasksAdded
      Optional. Service message: tasks were added to a checklist
    • directMessagePriceChanged

      @SerializedName("direct_message_price_changed") private DirectMessagePriceChanged directMessagePriceChanged
      Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed
    • replyToChecklistTaskId

      @SerializedName("reply_to_checklist_task_id") private Integer replyToChecklistTaskId
      Optional. Identifier of the specific checklist task that is being replied to
    • directMessagesTopic

      @SerializedName("direct_messages_topic") private DirectMessagesTopic directMessagesTopic
      Optional. Information about the direct messages chat topic that contains the message
    • isPaidPost

      @SerializedName("is_paid_post") private Boolean isPaidPost
      Optional. True, if the message is a paid post
    • suggestedPostApproved

      @SerializedName("suggested_post_approved") private SuggestedPostApproved suggestedPostApproved
      Optional. Service message: a suggested post was approved
    • suggestedPostApprovalFailed

      @SerializedName("suggested_post_approval_failed") private SuggestedPostApprovalFailed suggestedPostApprovalFailed
      Optional. Service message: approval of a suggested post has failed
    • suggestedPostDeclined

      @SerializedName("suggested_post_declined") private SuggestedPostDeclined suggestedPostDeclined
      Optional. Service message: a suggested post was declined
    • suggestedPostPaid

      @SerializedName("suggested_post_paid") private SuggestedPostPaid suggestedPostPaid
      Optional. Service message: payment for a suggested post was received
    • suggestedPostRefunded

      @SerializedName("suggested_post_refunded") private SuggestedPostRefunded suggestedPostRefunded
      Optional. Service message: payment for a suggested post was refunded
    • giftUpgradeSent

      @SerializedName("gift_upgrade_sent") private GiftInfo giftUpgradeSent
      Optional. Service message: upgrade of a gift was purchased after the gift was sent
    • chatOwnerLeft

      @SerializedName("chat_owner_left") private ChatOwnerLeft chatOwnerLeft
      Optional. Service message: chat owner has left
    • chatOwnerChanged

      @SerializedName("chat_owner_changed") private ChatOwnerChanged chatOwnerChanged
      Optional. Service message: chat owner has changed
    • senderTag

      @SerializedName("sender_tag") private String senderTag
  • Constructor Details

    • Message

      public Message()
  • Method Details

    • getMessageId

      public Integer getMessageId()
    • getMessageThreadId

      public Integer getMessageThreadId()
    • getDate

      public Integer getDate()
    • getEditDate

      public Integer getEditDate()
    • getMigrateToChatId

      public Long getMigrateToChatId()
    • getMigrateFromChatId

      public Long getMigrateFromChatId()
    • getAuthorSignature

      public String getAuthorSignature()
    • getText

      public String getText()
    • getCaption

      public String getCaption()
    • getNewChatTitle

      public String getNewChatTitle()
    • getConnectedWebsite

      public String getConnectedWebsite()
    • getMediaGroupId

      public String getMediaGroupId()
    • getBusinessConnectionId

      public String getBusinessConnectionId()
    • getFrom

      public User getFrom()
    • getViaBot

      public User getViaBot()
    • getLeftChatMember

      public User getLeftChatMember()
    • getSenderBusinessBot

      public User getSenderBusinessBot()
    • getNewChatMembers

      public List<User> getNewChatMembers()
    • getSenderChat

      public Chat getSenderChat()
    • getChat

      public Chat getChat()
    • getTopicMessage

      public Boolean getTopicMessage()
    • getAutomaticForward

      public Boolean getAutomaticForward()
    • getHasProtectedContent

      public Boolean getHasProtectedContent()
    • getFromOnline

      public Boolean getFromOnline()
    • getHasMediaSpoiler

      public Boolean getHasMediaSpoiler()
    • getDeleteChatPhoto

      public Boolean getDeleteChatPhoto()
    • getGroupChatCreated

      public Boolean getGroupChatCreated()
    • getSupergroupChatCreated

      public Boolean getSupergroupChatCreated()
    • getChannelChatCreated

      public Boolean getChannelChatCreated()
    • getReplyToMessage

      public Message getReplyToMessage()
    • getPinnedMessage

      public Message getPinnedMessage()
    • getEntities

      public List<MessageEntity> getEntities()
    • getCaptionEntities

      public List<MessageEntity> getCaptionEntities()
    • getAnimation

      public Animation getAnimation()
    • getAudio

      public Audio getAudio()
    • getDocument

      public Document getDocument()
    • getPhoto

      public List<PhotoSize> getPhoto()
    • getNewChatPhoto

      public List<PhotoSize> getNewChatPhoto()
    • getSticker

      public Sticker getSticker()
    • getVideo

      public Video getVideo()
    • getVideoNote

      public VideoNote getVideoNote()
    • getVoice

      public Voice getVoice()
    • getContact

      public Contact getContact()
    • getDice

      public Dice getDice()
    • getGame

      public Game getGame()
    • getPoll

      public Poll getPoll()
    • getStory

      public Story getStory()
    • getVenue

      public Venue getVenue()
    • getLocation

      public Location getLocation()
    • getMessageAutoDeleteTimerChanged

      public MessageAutoDeleteTimerChanged getMessageAutoDeleteTimerChanged()
    • getInvoice

      public Invoice getInvoice()
    • getSuccessfulPayment

      public SuccessfulPayment getSuccessfulPayment()
    • getUsersShared

      public UsersShared getUsersShared()
    • getChatShared

      public ChatShared getChatShared()
    • getWriteAccessAllowed

      public WriteAccessAllowed getWriteAccessAllowed()
    • getPassportData

      public PassportData getPassportData()
    • getProximityAlertTriggered

      public ProximityAlertTriggered getProximityAlertTriggered()
    • getForumTopicCreated

      public ForumTopicCreated getForumTopicCreated()
    • getForumTopicEdited

      public ForumTopicEdited getForumTopicEdited()
    • getForumTopicClosed

      public ForumTopicClosed getForumTopicClosed()
    • getForumTopicReopened

      public ForumTopicReopened getForumTopicReopened()
    • getGeneralForumTopicHidden

      public GeneralForumTopicHidden getGeneralForumTopicHidden()
    • getGeneralForumTopicUnhidden

      public GeneralForumTopicUnhidden getGeneralForumTopicUnhidden()
    • getVideoChatScheduled

      public VideoChatScheduled getVideoChatScheduled()
    • getVideoChatStarted

      public VideoChatStarted getVideoChatStarted()
    • getVideoChatEnded

      public VideoChatEnded getVideoChatEnded()
    • getVideoChatParticipantsInvited

      public VideoChatParticipantsInvited getVideoChatParticipantsInvited()
    • getWebAppData

      public WebAppData getWebAppData()
    • getReplyMarkup

      public InlineKeyboardMarkup getReplyMarkup()
    • getExternalReply

      public ExternalReplyInfo getExternalReply()
    • getQuote

      public TextQuote getQuote()
    • getLinkPreviewOptions

      public LinkPreviewOptions getLinkPreviewOptions()
    • getGiveaway

      public Giveaway getGiveaway()
    • getGiveawayCreated

      public GiveawayCreated getGiveawayCreated()
    • getGiveawayWinners

      public GiveawayWinners getGiveawayWinners()
    • getGiveawayCompleted

      public GiveawayCompleted getGiveawayCompleted()
    • getForwardOrigin

      public MessageOrigin getForwardOrigin()
    • getBoostAdded

      public ChatBoostAdded getBoostAdded()
    • getSenderBoostCount

      public Integer getSenderBoostCount()
    • getReplyToStory

      public Story getReplyToStory()
    • getChatBackgroundSet

      public ChatBackground getChatBackgroundSet()
    • getEffectId

      public String getEffectId()
    • getShowCaptionAboveMedia

      public Boolean getShowCaptionAboveMedia()
    • getPaidMedia

      public PaidMediaInfo getPaidMedia()
    • getRefundedPayment

      public RefundedPayment getRefundedPayment()
    • getGift

      public GiftInfo getGift()
    • getUniqueGift

      public UniqueGift getUniqueGift()
    • getPaidMessagePriceChanged

      public PaidMessagePriceChanged getPaidMessagePriceChanged()
    • getPaidStarCount

      public Integer getPaidStarCount()
    • getChecklist

      public Checklist getChecklist()
    • getChecklistTasksDone

      public ChecklistTasksAdded getChecklistTasksDone()
    • getChecklistTasksAdded

      public ChecklistTasksDone getChecklistTasksAdded()
    • getDirectMessagePriceChanged

      public DirectMessagePriceChanged getDirectMessagePriceChanged()
    • getReplyToChecklistTaskId

      public Integer getReplyToChecklistTaskId()
    • getDirectMessagesTopic

      public DirectMessagesTopic getDirectMessagesTopic()
    • getPaidPost

      public Boolean getPaidPost()
    • getSuggestedPostApproved

      public SuggestedPostApproved getSuggestedPostApproved()
    • getSuggestedPostApprovalFailed

      public SuggestedPostApprovalFailed getSuggestedPostApprovalFailed()
    • getSuggestedPostDeclined

      public SuggestedPostDeclined getSuggestedPostDeclined()
    • getSuggestedPostPaid

      public SuggestedPostPaid getSuggestedPostPaid()
    • getSuggestedPostRefunded

      public SuggestedPostRefunded getSuggestedPostRefunded()
    • getGiftUpgradeSent

      public GiftInfo getGiftUpgradeSent()
    • getChatOwnerLeft

      public ChatOwnerLeft getChatOwnerLeft()
    • getChatOwnerChanged

      public ChatOwnerChanged getChatOwnerChanged()
    • getSenderTag

      public String getSenderTag()
    • toString

      public String toString()
      Overrides:
      toString in class Object