Message
class Message extends BaseObject (View source)
Class Message.
Methods
Property relations.
Get an item from the collection by key.
Unique message identifier.
(Optional). Sender, can be empty for messages sent to channels.
Date the message was sent in Unix time.
Conversation the message belongs to.
(Optional). For forwarded messages, sender of the original message.
(Optional). For forwarded messages, date the original message was sent in Unix time.
(Optional). For replies, the original message. Note that the Message object in this field will not contain further replytomessage fields even if it itself is a reply.
(Optional). For text messages, the actual UTF-8 text of the message.
(Optional). Message is an audio file, information about the file.
(Optional). Message is a general file, information about the file.
(Optional). Message is a sticker, information about the sticker.
(Optional). Message is a video, information about the video.
(Optional). Message is a voice message, information about the file.
(Optional). Caption for the photo or video contact.
(Optional). Message is a shared contact, information about the contact.
(Optional). Message is a shared location, information about the location.
(Optional). A new member was added to the group, information about them (this member may be the bot itself).
(Optional). A member was removed from the group, information about them (this member may be the bot itself).
(Optional). A chat title was changed to this value.
(Optional). Service message: the chat photo was deleted.
(Optional). Service message: the group has been created.
(Optional). Service message: the super group has been created.
(Optional). Service message: the channel has been created.
(Optional). The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value.
(Optional). The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value.
Details
in
BaseObject at line 17
__construct(
array|mixed $data)
Builds collection entity.
at line 42
array
relations()
Property relations.
in
BaseObject at line 39
mixed|BaseObject
get(
mixed $key,
mixed $default = null)
Get an item from the collection by key.
in
BaseObject at line 53
array|void
mapRelatives()
Map property relatives to appropriate objects.
in
BaseObject at line 83
array|mixed
getRawResponse()
Returns raw response.
in
BaseObject at line 95
mixed
getRawResult($data)
Returns raw result.
in
BaseObject at line 105
mixed
getStatus()
Get Status of request.
in
BaseObject at line 118
mixed
__call($name, $arguments)
Magic method to get properties dynamically.
at line 37
int
getMessageId()
Unique message identifier.
at line 37
User
getFrom()
(Optional). Sender, can be empty for messages sent to channels.
at line 37
int
getDate()
Date the message was sent in Unix time.
at line 37
Chat
getChat()
Conversation the message belongs to.
at line 37
User
getForwardFrom()
(Optional). For forwarded messages, sender of the original message.
at line 37
int
getForwardDate()
(Optional). For forwarded messages, date the original message was sent in Unix time.
at line 37
Message
getReplyToMessage()
(Optional). For replies, the original message. Note that the Message object in this field will not contain further replytomessage fields even if it itself is a reply.
at line 37
string
getText()
(Optional). For text messages, the actual UTF-8 text of the message.
at line 37
Audio
getAudio()
(Optional). Message is an audio file, information about the file.
at line 37
Document
getDocument()
(Optional). Message is a general file, information about the file.
at line 37
Sticker
getSticker()
(Optional). Message is a sticker, information about the sticker.
at line 37
Video
getVideo()
(Optional). Message is a video, information about the video.
at line 37
Voice
getVoice()
(Optional). Message is a voice message, information about the file.
at line 37
string
getCaption()
(Optional). Caption for the photo or video contact.
at line 37
Contact
getContact()
(Optional). Message is a shared contact, information about the contact.
at line 37
Location
getLocation()
(Optional). Message is a shared location, information about the location.
at line 37
User
getNewChatParticipant()
(Optional). A new member was added to the group, information about them (this member may be the bot itself).
at line 37
User
getLeftChatParticipant()
(Optional). A member was removed from the group, information about them (this member may be the bot itself).
at line 37
string
getNewChatTitle()
(Optional). A chat title was changed to this value.
at line 37
bool
getDeleteChatPhoto()
(Optional). Service message: the chat photo was deleted.
at line 37
bool
getGroupChatCreated()
(Optional). Service message: the group has been created.
at line 37
bool
getSupergroupChatCreated()
(Optional). Service message: the super group has been created.
at line 37
bool
getChannelChatCreated()
(Optional). Service message: the channel has been created.
at line 37
int
getMigrateToChatId()
(Optional). The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value.
at line 37
int
getMigrateFromChatId()
(Optional). The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value.