Message
class Message extends BaseObject (View source)
Class Message
Methods
No description
Get an item from the collection by key.
Unique message identifier.
Sender.
Date the message was sent in Unix time.
Conversation the message belongs to, private or group.
(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 bot itself).
(Optional). A member was removed from the group, information about them (this member may be bot itself).
(Optional). A group title was changed to this value.
(Optional). Informs that the group photo was deleted.
(Optional). Informs that the group has been created.
Details
in
BaseObject at line 19
__construct(
array|mixed $data)
Builds collection entity.
at line 39
array
relations()
in
BaseObject at line 41
mixed|BaseObject
get(
mixed $key,
mixed $default = null)
Get an item from the collection by key.
in
BaseObject at line 55
array|void
mapRelatives()
Map property relatives to appropriate objects.
in
BaseObject at line 80
array|mixed
getRawResponse()
Returns raw response.
in
BaseObject at line 92
mixed
getRawResult($data)
Returns raw result.
in
BaseObject at line 102
mixed
getStatus()
Get Status of request.
in
BaseObject at line 116
mixed
__call($name, $arguments)
Magic method to get properties dynamically.
at line 34
int
getMessageId()
Unique message identifier.
at line 34
User
getFrom()
Sender.
at line 34
int
getDate()
Date the message was sent in Unix time.
at line 34
User|GroupChat
getChat()
Conversation the message belongs to, private or group.
at line 34
User
getForwardFrom()
(Optional). For forwarded messages, sender of the original message.
at line 34
int
getForwardDate()
(Optional). For forwarded messages, date the original message was sent in Unix time.
at line 34
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 34
string
getText()
(Optional). For text messages, the actual UTF-8 text of the message.
at line 34
Audio
getAudio()
(Optional). Message is an audio file, information about the file.
at line 34
Document
getDocument()
(Optional). Message is a general file, information about the file.
at line 34
Sticker
getSticker()
(Optional). Message is a sticker, information about the sticker.
at line 34
Video
getVideo()
(Optional). Message is a video, information about the video.
at line 34
Voice
getVoice()
(Optional). Message is a voice message, information about the file.
at line 34
string
getCaption()
(Optional). Caption for the photo or video contact
at line 34
Contact
getContact()
(Optional). Message is a shared contact, information about the contact.
at line 34
Location
getLocation()
(Optional). Message is a shared location, information about the location.
at line 34
User
getNewChatParticipant()
(Optional). A new member was added to the group, information about them (this member may be bot itself).
at line 34
User
getLeftChatParticipant()
(Optional). A member was removed from the group, information about them (this member may be bot itself).
at line 34
string
getNewChatTitle()
(Optional). A group title was changed to this value.
at line 34
bool
getDeleteChatPhoto()
(Optional). Informs that the group photo was deleted.
at line 34
bool
getGroupChatCreated()
(Optional). Informs that the group has been created.