Class MessageType.

see
package Default

 Properties

 

Optional. Message is an animation, information about the animation.

$animation : \TgBotApi\BotApiBase\Type\AnimationType | null

Default

For backward compatibility, when this field is set, the document field will also be set.

 

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

$audio : \TgBotApi\BotApiBase\Type\AudioType | null

Default

 

Optional. Signature of the post author for messages in channels.

$authorSignature : string | null

Default

 

Optional. Caption for the audio, document, photo, video or voice, 0-1024 characters.

$caption : string | null

Default

 

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

$captionEntities : array<mixed,\TgBotApi\BotApiBase\Type\MessageEntityType> | null

Default

 

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.

$channelChatCreated : boolean | null

Default

 

Conversation the message belongs to.

$chat : \TgBotApi\BotApiBase\Type\ChatType

Default

 

$connectedWebsite

$connectedWebsite : string | null

Default

 

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

$contact : \TgBotApi\BotApiBase\Type\ContactType | null

Default

 

Date the message was sent in \DateTimeInterface.

$date : \DateTimeImmutable

Default

 

Optional. Service message: the chat photo was deleted.

$deleteChatPhoto : boolean | null

Default

 

Optional. Message is a dice with random value from 1 to 6.

$dice : \TgBotApi\BotApiBase\Type\DiceType | null

Default

 

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

$document : \TgBotApi\BotApiBase\Type\DocumentType | null

Default

 

Optional. Date the message was last edited in \DateTimeImmutable.

$editDate : \DateTimeImmutable | null

Default

 

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

$entities : array<mixed,\TgBotApi\BotApiBase\Type\MessageEntityType> | null

Default

 

Optional. For forwarded messages, date the original message was sent in \DateTimeImmutable.

$forwardDate : \DateTimeImmutable | null

Default

 

Optional. For forwarded messages, sender of the original message.

$forwardFrom : \TgBotApi\BotApiBase\Type\UserType | null

Default

 

Optional. For messages forwarded from channels, information about the original channel.

$forwardFromChat : \TgBotApi\BotApiBase\Type\ChatType | null

Default

 

Optional. For messages forwarded from channels, identifier of the original message in the channel.

$forwardFromMessageId : integer | null

Default

 

Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages.

$forwardSenderName : string | null

Default

 

Optional. For messages forwarded from channels, signature of the post author if present.

$forwardSignature : string | null

Default

 

Optional. Sender, empty for messages sent to channels.

$from : \TgBotApi\BotApiBase\Type\UserType | null

Default

 

$game

$game : \TgBotApi\BotApiBase\Type\GameType | null

Default

 

Optional. Service message: the group has been created.

$groupChanelCreated : boolean | null

Default

 

$invoice

$invoice : \TgBotApi\BotApiBase\Type\InvoiceType | null

Default

 

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

$leftChatMember : \TgBotApi\BotApiBase\Type\UserType | null

Default

 

Warning: This variable is experimental.

$leftChatParticipant : \TgBotApi\BotApiBase\Type\UserType | null

Default

experimental Returns User type
 

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

$location : \TgBotApi\BotApiBase\Type\LocationType | null

Default

 

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

$mediaGroupId : string | null

Default

 

Unique message identifier inside this chat.

$messageId : integer

Default

 

Optional. The supergroup has been migrated from a group with the specified identifier.

$migrateFromChat : integer | null

Default

This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

 

Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it.

$migrateToChat : integer | null

Default

But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

 

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

$newChatMembers : array<mixed,\TgBotApi\BotApiBase\Type\UserType> | null

Default

 

Optional. A chat photo was change to this value.

$newChatPhoto : array<mixed,\TgBotApi\BotApiBase\Type\PhotoSizeType> | null

Default

 

Optional. A chat title was changed to this value.

$newChatTitle : string | null

Default

 

Optional. Telegram Passport data.

$passportData : \TgBotApi\BotApiBase\Type\PassportDataType | null

Default

 

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

$photo : array<mixed,\TgBotApi\BotApiBase\Type\PhotoSizeType> | null

Default

 

Optional. Specified message was pinned.

$pinnedMessage : \TgBotApi\BotApiBase\Type\MessageType | null

Default

Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.

 

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

$poll : \TgBotApi\BotApiBase\Type\PollType | null

Default

 

Optional. Service message.

$proximityAlertTriggered : \TgBotApi\BotApiBase\Type\ProximityAlertTriggeredType | null

Default

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

 

Optional. For replies, 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.

$replyToMessage : \TgBotApi\BotApiBase\Type\MessageType | null

Default

 

Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages.

$senderChat : \TgBotApi\BotApiBase\Type\ChatType | null

Default

The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group.

 

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

$sticker : \TgBotApi\BotApiBase\Type\StickerType | null

Default

 

$successfulPayment

$successfulPayment : \TgBotApi\BotApiBase\Type\SuccessfulPaymentType | null

Default

 

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.

$supergroupChatCreated : boolean | null

Default

 

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

$text : string | null

Default

 

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

$venue : \TgBotApi\BotApiBase\Type\VenueType | null

Default

 

Optional. Bot through which the message was sent.

$viaBot : \TgBotApi\BotApiBase\Type\UserType | null

Default

 

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

$video : \TgBotApi\BotApiBase\Type\VideoType | null

Default

 

$videoNote

$videoNote : \TgBotApi\BotApiBase\Type\VideoNoteType | null

Default

 

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

$voice : \TgBotApi\BotApiBase\Type\VoiceType | null

Default