Message

telegramium.bots.Message
final case class Message(messageId: Int, date: Int, chat: Chat, messageThreadId: Option[Int], from: Option[User], senderChat: Option[Chat], senderBoostCount: Option[Int], senderBusinessBot: Option[User], businessConnectionId: Option[String], forwardOrigin: Option[MessageOrigin], isTopicMessage: Option[Boolean], isAutomaticForward: Option[Boolean], replyToMessage: Option[Message], externalReply: Option[ExternalReplyInfo], quote: Option[TextQuote], replyToStory: Option[Story], viaBot: Option[User], editDate: Option[Int], hasProtectedContent: Option[Boolean], isFromOffline: Option[Boolean], mediaGroupId: Option[String], authorSignature: Option[String], text: Option[String], entities: List[MessageEntity], linkPreviewOptions: Option[LinkPreviewOptions], animation: Option[Animation], audio: Option[Audio], document: Option[Document], photo: List[PhotoSize], sticker: Option[Sticker], story: Option[Story], video: Option[Video], videoNote: Option[VideoNote], voice: Option[Voice], caption: Option[String], captionEntities: List[MessageEntity], hasMediaSpoiler: Option[Boolean], contact: Option[Contact], dice: Option[Dice], game: Option[Game], poll: Option[Poll], venue: Option[Venue], location: Option[Location], newChatMembers: List[User], leftChatMember: Option[User], newChatTitle: Option[String], newChatPhoto: List[PhotoSize], deleteChatPhoto: Option[Boolean], groupChatCreated: Option[Boolean], supergroupChatCreated: Option[Boolean], channelChatCreated: Option[Boolean], messageAutoDeleteTimerChanged: Option[MessageAutoDeleteTimerChanged], migrateToChatId: Option[Long], migrateFromChatId: Option[Long], pinnedMessage: Option[MaybeInaccessibleMessage], invoice: Option[Invoice], successfulPayment: Option[SuccessfulPayment], usersShared: Option[UsersShared], chatShared: Option[ChatShared], connectedWebsite: Option[String], writeAccessAllowed: Option[WriteAccessAllowed], passportData: Option[PassportData], proximityAlertTriggered: Option[ProximityAlertTriggered], boostAdded: Option[ChatBoostAdded], forumTopicCreated: Option[ForumTopicCreated], forumTopicEdited: Option[ForumTopicEdited], forumTopicClosed: Option[ForumTopicClosed.type], forumTopicReopened: Option[ForumTopicReopened.type], generalForumTopicHidden: Option[GeneralForumTopicHidden.type], generalForumTopicUnhidden: Option[GeneralForumTopicUnhidden.type], giveawayCreated: Option[GiveawayCreated.type], giveaway: Option[Giveaway], giveawayWinners: Option[GiveawayWinners], giveawayCompleted: Option[GiveawayCompleted], videoChatScheduled: Option[VideoChatScheduled], videoChatStarted: Option[VideoChatStarted.type], videoChatEnded: Option[VideoChatEnded], videoChatParticipantsInvited: Option[VideoChatParticipantsInvited], webAppData: Option[WebAppData], replyMarkup: Option[InlineKeyboardMarkup]) extends MaybeInaccessibleMessage

This object represents a message.

Value parameters

animation

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

audio

Optional. Message is an audio file, information about the file

authorSignature

Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator

boostAdded

Optional. Service message: user boosted the chat

businessConnectionId

Optional. 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.

caption

Optional. Caption for the animation, audio, document, photo, video or voice

captionEntities

Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption

channelChatCreated

Optional. 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.

chat

Chat the message belongs to

chatShared

Optional. Service message: a chat was shared with the bot

connectedWebsite

Optional. The domain name of the website on which the user has logged in.

contact

Optional. Message is a shared contact, information about the contact

date

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

deleteChatPhoto

Optional. Service message: the chat photo was deleted

dice

Optional. Message is a dice with random value

document

Optional. Message is a general file, information about the file

editDate

Optional. Date the message was last edited in Unix time

entities

Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text

externalReply

Optional. Information about the message that is being replied to, which may come from another chat or forum topic

forumTopicClosed

Optional. Service message: forum topic closed

forumTopicCreated

Optional. Service message: forum topic created

forumTopicEdited

Optional. Service message: forum topic edited

forumTopicReopened

Optional. Service message: forum topic reopened

forwardOrigin

Optional. Information about the original message for forwarded messages

from

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

game

Optional. Message is a game, information about the game.

generalForumTopicHidden

Optional. Service message: the 'General' forum topic hidden

generalForumTopicUnhidden

Optional. Service message: the 'General' forum topic unhidden

giveaway

Optional. The message is a scheduled giveaway message

giveawayCompleted

Optional. Service message: a giveaway without public winners was completed

giveawayCreated

Optional. Service message: a scheduled giveaway was created

giveawayWinners

Optional. A giveaway with public winners was completed

groupChatCreated

Optional. Service message: the group has been created

hasMediaSpoiler

Optional. True, if the message media is covered by a spoiler animation

hasProtectedContent

Optional. True, if the message can't be forwarded

invoice

Optional. Message is an invoice for a payment, information about the invoice.

isAutomaticForward

Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group

isFromOffline

Optional. 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

isTopicMessage

Optional. True, if the message is sent to a forum topic

leftChatMember

Optional. A member was removed from the group, information about them (this member may be the bot itself)

linkPreviewOptions

Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed

location

Optional. Message is a shared location, information about the location

mediaGroupId

Optional. The unique identifier of a media message group this message belongs to

messageAutoDeleteTimerChanged

Optional. Service message: auto-delete timer settings changed in the chat

messageId

Unique message identifier inside this chat

messageThreadId

Optional. Unique identifier of a message thread to which the message belongs; for supergroups only

migrateFromChatId

Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

migrateToChatId

Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

newChatMembers

Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

newChatPhoto

Optional. A chat photo was change to this value

newChatTitle

Optional. A chat title was changed to this value

passportData

Optional. Telegram Passport data

photo

Optional. Message is a photo, available sizes of the photo

pinnedMessage

Optional. 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.

poll

Optional. Message is a native poll, information about the poll

proximityAlertTriggered

Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.

quote

Optional. For replies that quote part of the original message, the quoted part of the message

replyMarkup

Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

replyToMessage

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

replyToStory

Optional. For replies to a story, the original story

senderBoostCount

Optional. If the sender of the message boosted the chat, the number of boosts added by the user

senderBusinessBot

Optional. 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.

senderChat

Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.

sticker

Optional. Message is a sticker, information about the sticker

story

Optional. Message is a forwarded story

successfulPayment

Optional. Message is a service message about a successful payment, information about the payment.

supergroupChatCreated

Optional. 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.

text

Optional. For text messages, the actual UTF-8 text of the message

usersShared

Optional. Service message: users were shared with the bot

venue

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

viaBot

Optional. Bot through which the message was sent

video

Optional. Message is a video, information about the video

videoChatEnded

Optional. Service message: video chat ended

videoChatParticipantsInvited

Optional. Service message: new participants invited to a video chat

videoChatScheduled

Optional. Service message: video chat scheduled

videoChatStarted

Optional. Service message: video chat started

videoNote

Optional. Message is a video note, information about the video message

voice

Optional. Message is a voice message, information about the file

webAppData

Optional. Service message: data sent by a Web App

writeAccessAllowed

Optional. 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

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product