Class Message

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

public class Message extends Object implements TelegramUpdate
This class represents message
Since:
3 March 2025
  • Field Details

    • message_id

      public Integer message_id
      Unique message identifier inside this chat. In specific instances
    • message_thread_id

      public Integer message_thread_id
      Unique identifier of a message thread to which the message belongs; for supergroups only
    • date

      public Integer date
      Date the message was sent in Unix time. It is always a positive number, representing a valid date.
    • edit_date

      public Integer edit_date
      Date the message was last edited in Unix time
    • migrate_to_chat_id

      public Long migrate_to_chat_id
      The group has been migrated to a supergroup with the specified identifier.
    • migrate_from_chat_id

      public Long migrate_from_chat_id
      The supergroup has been migrated from a group with the specified identifier
    • author_signature

      public String author_signature
      Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
    • text

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

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

      public String new_chat_title
      A chat title was changed to this value
    • connected_website

      public String connected_website
      The domain name of the website on which the user has logged in
      See Also:
    • media_group_id

      public String media_group_id
      The unique identifier of a media message group this message belongs to
    • business_connection_id

      public String business_connection_id
      Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
    • from

      public User from
      Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats
    • via_bot

      public User via_bot
      Bot through which the message was sent
    • left_chat_member

      public User left_chat_member
      A member was removed from the group, information about them (this member may be the bot itself)
    • sender_business_bot

      public User sender_business_bot
      The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.
    • new_chat_members

      public List<User> new_chat_members
      New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
    • sender_chat

      public Chat sender_chat
      Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.
    • chat

      public Chat chat
      Chat the message belongs to
    • is_topic_message

      public Boolean is_topic_message
      True, if the message is sent to a forum topic
    • is_automatic_forward

      public Boolean is_automatic_forward
      True, if the message is a channel post that was automatically forwarded to the connected discussion group
    • has_protected_content

      public Boolean has_protected_content
      True, if the message can't be forwarded
    • is_from_online

      public Boolean is_from_online
      True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message
    • has_media_spoiler

      public Boolean has_media_spoiler
      True, if the message media is covered by a spoiler animation
    • delete_chat_photo

      public Boolean delete_chat_photo
      Service message: the chat photo was deleted
    • group_chat_created

      public Boolean group_chat_created
      Service message: the group has been created
    • supergroup_chat_created

      public Boolean supergroup_chat_created
      Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
    • channel_chat_created

      public Boolean channel_chat_created
      Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
    • reply_to_message

      public Message reply_to_message
      For replies in the same chat and message thread, the original message. N ote that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
    • pinned_message

      public Message pinned_message
      Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
    • entities

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

      public List<MessageEntity> caption_entities
      For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
    • animation

      public Animation animation
      Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
    • audio

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

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

      public List<PhotoSize> photo
      Message is a photo, available sizes of the photo
    • new_chat_photo

      public List<PhotoSize> new_chat_photo
      A chat photo was change to this value
    • sticker

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

      public Video video
      Message is a video, information about the video
    • video_note

      public VideoNote video_note
      Message is a video note, information about the video message
    • voice

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

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

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

      public Game game
      Message is a game, information about the game
      See Also:
    • poll

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

      public Story story
      Message is a forwarded story
    • venue

      public Venue venue
      Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
    • location

      public Location location
      Message is a shared location, information about the location
    • message_auto_delete_timer_changed

      public MessageAutoDeleteTimerChanged message_auto_delete_timer_changed
      Service message: auto-delete timer settings changed in the chat
    • invoice

      public Invoice invoice
      Message is an invoice for a payment, information about the invoice.
      See Also:
    • successful_payment

      public SuccessfulPayment successful_payment
      Message is a service message about a successful payment, information about the payment
      See Also:
    • users_shared

      public UsersShared users_shared
      Service message: users were shared with the bot
    • chat_shared

      public ChatShared chat_shared
      Service message: a chat was shared with the bot
    • write_access_allowed

      public WriteAccessAllowed write_access_allowed
      Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess
    • passport_data

      public PassportData passport_data
      Telegram Passport data
    • proximity_alert_triggered

      public ProximityAlertTriggered proximity_alert_triggered
      Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
    • forum_topic_created

      public ForumTopicCreated forum_topic_created
      Service message: forum topic created
    • forum_topic_edited

      public ForumTopicEdited forum_topic_edited
      Service message: forum topic edited
    • forum_topic_closed

      public ForumTopicClosed forum_topic_closed
      Service message: forum topic closed
    • forum_topic_reopened

      public ForumTopicReopened forum_topic_reopened
      Service message: forum topic reopened
    • general_forum_topic_hidden

      public GeneralForumTopicHidden general_forum_topic_hidden
      Service message: the 'General' forum topic hidden
    • general_forum_topic_unhidden

      public GeneralForumTopicUnhidden general_forum_topic_unhidden
      Service message: the 'General' forum topic unhidden
    • video_chat_scheduled

      public VideoChatScheduled video_chat_scheduled
      Service message: video chat scheduled
    • video_chat_started

      public VideoChatStarted video_chat_started
      Service message: video chat started
    • video_chat_ended

      public VideoChatEnded video_chat_ended
      Service message: video chat ended
    • video_chat_participants_invited

      public VideoChatParticipantsInvited video_chat_participants_invited
      Service message: new participants invited to a video chat
    • web_app_data

      public WebAppData web_app_data
      Service message: data sent by a Web App
    • reply_markup

      public InlineKeyboardMarkup reply_markup
      Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
    • external_reply

      public ExternalReplyInfo external_reply
      Information about the message that is being replied to, which may come from another chat or forum topic
    • quote

      public TextQuote quote
      For replies that quote part of the original message, the quoted part of the message
    • giveaway

      public Giveaway giveaway
      The message is a scheduled giveaway message
    • giveaway_created

      public GiveawayCreated giveaway_created
      Service message: a scheduled giveaway was created
    • giveaway_winners

      public GiveawayWinners giveaway_winners
      A giveaway with public winners was completed
    • giveaway_completed

      public GiveawayCompleted giveaway_completed
      Service message: a giveaway without public winners was completed
    • forward_origin

      public MessageOrigin forward_origin
      Information about the original message for forwarded messages
    • boost_added

      public ChatBoostAdded boost_added
      Service message: user boosted the chat
    • sender_boost_count

      public Integer sender_boost_count
      If the sender of the message boosted the chat, the number of boosts added by the user
    • reply_to_story

      public Story reply_to_story
      For replies to a story, the original story
    • chat_background_set

      public ChatBackground chat_background_set
      Service message: chat background set
    • effect_id

      public String effect_id
      Unique identifier of the message effect added to the message
    • show_caption_above_media

      public Boolean show_caption_above_media
      True, if the caption must be shown above the message media
    • refunded_payment

      public RefundedPayment refunded_payment
      Message is a service message about a refunded payment, information about the payment.
      See Also:
    • gift

      public GiftInfo gift
      Optional. Service message: a regular gift was sent or received
    • unique_gift

      public UniqueGift unique_gift
      Optional. Service message: a unique gift was sent or received
    • checklist

      public Checklist checklist
      Optional. Message is a checklist
    • checklist_tasks_done

      public ChecklistTasksAdded checklist_tasks_done
      Optional. Service message: some tasks in a checklist were marked as done or not done
    • checklist_tasks_added

      public ChecklistTasksDone checklist_tasks_added
      Optional. Service message: tasks were added to a checklist
    • direct_message_price_changed

      public DirectMessagePriceChanged direct_message_price_changed
      Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed
  • Constructor Details

    • Message

      public Message()
  • Method Details