PHP Class TelegramBot\Api\Types\Message

Inheritance: extends TelegramBot\Api\BaseType, implements TelegramBot\Api\TypeInterface
Afficher le fichier Open project: TelegramBot/Api Class Usage Examples

Protected Properties

Свойство Type Description
$audio TelegramBot\Api\Types\Audio Optional. Message is an audio file, information about the file
$caption string Optional. Text description of the video (usually empty)
$channelChatCreated boolean Optional. Service message: the channel has been created
$chat Chat Conversation the message belongs to — user in case of a private message, GroupChat in case of a group
$contact TelegramBot\Api\Types\Contact Optional. Message is a shared contact, information about the contact
$date integer Date the message was sent in Unix time
$deleteChatPhoto boolean Optional. Informs that the group photo was deleted
$document TelegramBot\Api\Types\Document Optional. Message is a general file, information about the file
$entities array array of \TelegramBot\Api\Types\MessageEntity
$forwardDate integer Optional. For forwarded messages, date the original message was sent in Unix time
$forwardFrom User Optional. For forwarded messages, sender of the original message
$from User Optional. Sender name. Can be empty for messages sent to channels
$groupChatCreated boolean Optional. Informs that the group has been created
$leftChatMember User Optional. A member was removed from the group, information about them (this member may be bot itself)
$location TelegramBot\Api\Types\Location Optional. Message is a shared location, information about the location
$map array
$messageId integer Unique message identifier
$migrateFromChatId integer Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value
$migrateToChatId integer Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value
$newChatMember User Optional. A new member was added to the group, information about them (this member may be bot itself)
$newChatPhoto mixed Optional. A group photo was change to this value
$newChatTitle string Optional. A group title was changed to this value
$photo array Optional. Message is a photo, available sizes of the photo array of \TelegramBot\Api\Types\Photo
$pinnedMessage Message Optional. Specified message was pinned.Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
$replyToMessage Message 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.
$requiredParams array
$sticker TelegramBot\Api\Types\Sticker Optional. Message is a sticker, information about the sticker
$supergroupChatCreated boolean Optional. Service message: the supergroup has been created
$text string Optional. For text messages, the actual UTF-8 text of the message
$venue Venue Optional. Message is a venue, information about the venue
$video TelegramBot\Api\Types\Video Optional. Message is a video, information about the video
$voice TelegramBot\Api\Types\Voice Optional. Message is a voice message, information about the file

Méthodes publiques

Méthode Description
getAudio ( ) : TelegramBot\Api\Types\Audio
getCaption ( ) : string
getChat ( ) : Chat
getContact ( ) : TelegramBot\Api\Types\Contact
getDate ( ) : integer
getDocument ( ) : TelegramBot\Api\Types\Document
getEntities ( ) : array
getForwardDate ( ) : integer
getForwardFrom ( ) : User
getFrom ( ) : User
getLeftChatMember ( ) : User
getLocation ( ) : TelegramBot\Api\Types\Location
getMessageId ( ) : integer
getMigrateFromChatId ( ) : integer
getMigrateToChatId ( ) : integer
getNewChatMember ( ) : User
getNewChatPhoto ( ) : array
getNewChatTitle ( ) : string
getPhoto ( ) : array
getPinnedMessage ( ) : Message
getReplyToMessage ( ) : Message
getSticker ( ) : TelegramBot\Api\Types\Sticker
getText ( ) : string
getVenue ( ) : Venue
getVideo ( ) : TelegramBot\Api\Types\Video
getVoice ( ) : TelegramBot\Api\Types\Voice
isChannelChatCreated ( ) : boolean
isDeleteChatPhoto ( ) : boolean
isGroupChatCreated ( ) : boolean
isSupergroupChatCreated ( ) : boolean
setAudio ( TelegramBot\Api\Types\Audio $audio )
setCaption ( string $caption )
setChannelChatCreated ( boolean $channelChatCreated )
setChat ( Chat $chat )
setContact ( TelegramBot\Api\Types\Contact $contact )
setDate ( integer $date )
setDeleteChatPhoto ( boolean $deleteChatPhoto )
setDocument ( TelegramBot\Api\Types\Document $document )
setEntities ( array $entities )
setForwardDate ( integer $forwardDate )
setForwardFrom ( User $forwardFrom )
setFrom ( User $from )
setGroupChatCreated ( boolean $groupChatCreated )
setLeftChatMember ( User $leftChatMember )
setLocation ( TelegramBot\Api\Types\Location $location )
setMessageId ( integer $messageId )
setMigrateFromChatId ( integer $migrateFromChatId )
setMigrateToChatId ( integer $migrateToChatId )
setNewChatMember ( User $newChatMember )
setNewChatPhoto ( array $newChatPhoto )
setNewChatTitle ( string $newChatTitle )
setPhoto ( array $photo )
setPinnedMessage ( Message $pinnedMessage )
setReplyToMessage ( Message $replyToMessage )
setSticker ( TelegramBot\Api\Types\Sticker $sticker )
setSupergroupChatCreated ( boolean $supergroupChatCreated )
setText ( string $text )
setVenue ( Venue $venue )
setVideo ( TelegramBot\Api\Types\Video $video )
setVoice ( TelegramBot\Api\Types\Voice $voice )

Method Details

getAudio() public méthode

public getAudio ( ) : TelegramBot\Api\Types\Audio
Résultat TelegramBot\Api\Types\Audio

getCaption() public méthode

public getCaption ( ) : string
Résultat string

getChat() public méthode

public getChat ( ) : Chat
Résultat Chat

getContact() public méthode

public getContact ( ) : TelegramBot\Api\Types\Contact
Résultat TelegramBot\Api\Types\Contact

getDate() public méthode

public getDate ( ) : integer
Résultat integer

getDocument() public méthode

public getDocument ( ) : TelegramBot\Api\Types\Document
Résultat TelegramBot\Api\Types\Document

getEntities() public méthode

public getEntities ( ) : array
Résultat array

getForwardDate() public méthode

public getForwardDate ( ) : integer
Résultat integer

getForwardFrom() public méthode

public getForwardFrom ( ) : User
Résultat User

getFrom() public méthode

public getFrom ( ) : User
Résultat User

getLeftChatMember() public méthode

public getLeftChatMember ( ) : User
Résultat User

getLocation() public méthode

public getLocation ( ) : TelegramBot\Api\Types\Location
Résultat TelegramBot\Api\Types\Location

getMessageId() public méthode

public getMessageId ( ) : integer
Résultat integer

getMigrateFromChatId() public méthode

public getMigrateFromChatId ( ) : integer
Résultat integer

getMigrateToChatId() public méthode

public getMigrateToChatId ( ) : integer
Résultat integer

getNewChatMember() public méthode

public getNewChatMember ( ) : User
Résultat User

getNewChatPhoto() public méthode

public getNewChatPhoto ( ) : array
Résultat array

getNewChatTitle() public méthode

public getNewChatTitle ( ) : string
Résultat string

getPhoto() public méthode

public getPhoto ( ) : array
Résultat array

getPinnedMessage() public méthode

public getPinnedMessage ( ) : Message
Résultat Message

getReplyToMessage() public méthode

public getReplyToMessage ( ) : Message
Résultat Message

getSticker() public méthode

public getSticker ( ) : TelegramBot\Api\Types\Sticker
Résultat TelegramBot\Api\Types\Sticker

getText() public méthode

public getText ( ) : string
Résultat string

getVenue() public méthode

public getVenue ( ) : Venue
Résultat Venue

getVideo() public méthode

public getVideo ( ) : TelegramBot\Api\Types\Video
Résultat TelegramBot\Api\Types\Video

getVoice() public méthode

public getVoice ( ) : TelegramBot\Api\Types\Voice
Résultat TelegramBot\Api\Types\Voice

isChannelChatCreated() public méthode

public isChannelChatCreated ( ) : boolean
Résultat boolean

isDeleteChatPhoto() public méthode

public isDeleteChatPhoto ( ) : boolean
Résultat boolean

isGroupChatCreated() public méthode

public isGroupChatCreated ( ) : boolean
Résultat boolean

isSupergroupChatCreated() public méthode

public isSupergroupChatCreated ( ) : boolean
Résultat boolean

setAudio() public méthode

public setAudio ( TelegramBot\Api\Types\Audio $audio )
$audio TelegramBot\Api\Types\Audio

setCaption() public méthode

public setCaption ( string $caption )
$caption string

setChannelChatCreated() public méthode

public setChannelChatCreated ( boolean $channelChatCreated )
$channelChatCreated boolean

setChat() public méthode

public setChat ( Chat $chat )
$chat Chat

setContact() public méthode

public setContact ( TelegramBot\Api\Types\Contact $contact )
$contact TelegramBot\Api\Types\Contact

setDate() public méthode

public setDate ( integer $date )
$date integer

setDeleteChatPhoto() public méthode

public setDeleteChatPhoto ( boolean $deleteChatPhoto )
$deleteChatPhoto boolean

setDocument() public méthode

public setDocument ( TelegramBot\Api\Types\Document $document )
$document TelegramBot\Api\Types\Document

setEntities() public méthode

public setEntities ( array $entities )
$entities array

setForwardDate() public méthode

public setForwardDate ( integer $forwardDate )
$forwardDate integer

setForwardFrom() public méthode

public setForwardFrom ( User $forwardFrom )
$forwardFrom User

setFrom() public méthode

public setFrom ( User $from )
$from User

setGroupChatCreated() public méthode

public setGroupChatCreated ( boolean $groupChatCreated )
$groupChatCreated boolean

setLeftChatMember() public méthode

public setLeftChatMember ( User $leftChatMember )
$leftChatMember User

setLocation() public méthode

public setLocation ( TelegramBot\Api\Types\Location $location )
$location TelegramBot\Api\Types\Location

setMessageId() public méthode

public setMessageId ( integer $messageId )
$messageId integer

setMigrateFromChatId() public méthode

public setMigrateFromChatId ( integer $migrateFromChatId )
$migrateFromChatId integer

setMigrateToChatId() public méthode

public setMigrateToChatId ( integer $migrateToChatId )
$migrateToChatId integer

setNewChatMember() public méthode

public setNewChatMember ( User $newChatMember )
$newChatMember User

setNewChatPhoto() public méthode

public setNewChatPhoto ( array $newChatPhoto )
$newChatPhoto array

setNewChatTitle() public méthode

public setNewChatTitle ( string $newChatTitle )
$newChatTitle string

setPhoto() public méthode

public setPhoto ( array $photo )
$photo array

setPinnedMessage() public méthode

public setPinnedMessage ( Message $pinnedMessage )
$pinnedMessage Message

setReplyToMessage() public méthode

public setReplyToMessage ( Message $replyToMessage )
$replyToMessage Message

setSticker() public méthode

public setSticker ( TelegramBot\Api\Types\Sticker $sticker )
$sticker TelegramBot\Api\Types\Sticker

setSupergroupChatCreated() public méthode

public setSupergroupChatCreated ( boolean $supergroupChatCreated )
$supergroupChatCreated boolean

setText() public méthode

public setText ( string $text )
$text string

setVenue() public méthode

public setVenue ( Venue $venue )
$venue Venue

setVideo() public méthode

public setVideo ( TelegramBot\Api\Types\Video $video )
$video TelegramBot\Api\Types\Video

setVoice() public méthode

public setVoice ( TelegramBot\Api\Types\Voice $voice )
$voice TelegramBot\Api\Types\Voice

Property Details

$audio protected_oe property

Optional. Message is an audio file, information about the file
protected Audio,TelegramBot\Api\Types $audio
Résultat TelegramBot\Api\Types\Audio

$caption protected_oe property

Optional. Text description of the video (usually empty)
protected string $caption
Résultat string

$channelChatCreated protected_oe property

Optional. Service message: the channel has been created
protected bool $channelChatCreated
Résultat boolean

$chat protected_oe property

Conversation the message belongs to — user in case of a private message, GroupChat in case of a group
protected Chat,TelegramBot\Api\Types $chat
Résultat Chat

$contact protected_oe property

Optional. Message is a shared contact, information about the contact
protected Contact,TelegramBot\Api\Types $contact
Résultat TelegramBot\Api\Types\Contact

$date protected_oe property

Date the message was sent in Unix time
protected int $date
Résultat integer

$deleteChatPhoto protected_oe property

Optional. Informs that the group photo was deleted
protected bool $deleteChatPhoto
Résultat boolean

$document protected_oe property

Optional. Message is a general file, information about the file
protected Document,TelegramBot\Api\Types $document
Résultat TelegramBot\Api\Types\Document

$entities protected_oe property

array of \TelegramBot\Api\Types\MessageEntity
protected array $entities
Résultat array

$forwardDate protected_oe property

Optional. For forwarded messages, date the original message was sent in Unix time
protected int $forwardDate
Résultat integer

$forwardFrom protected_oe property

Optional. For forwarded messages, sender of the original message
protected User,TelegramBot\Api\Types $forwardFrom
Résultat User

$from protected_oe property

Optional. Sender name. Can be empty for messages sent to channels
protected User,TelegramBot\Api\Types $from
Résultat User

$groupChatCreated protected_oe property

Optional. Informs that the group has been created
protected bool $groupChatCreated
Résultat boolean

$leftChatMember protected_oe property

Optional. A member was removed from the group, information about them (this member may be bot itself)
protected User,TelegramBot\Api\Types $leftChatMember
Résultat User

$location protected_oe property

Optional. Message is a shared location, information about the location
protected Location,TelegramBot\Api\Types $location
Résultat TelegramBot\Api\Types\Location

$map protected_oe static_oe property

protected static array $map
Résultat array

$messageId protected_oe property

Unique message identifier
protected int $messageId
Résultat integer

$migrateFromChatId protected_oe property

Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value
protected int $migrateFromChatId
Résultat integer

$migrateToChatId protected_oe property

Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value
protected int $migrateToChatId
Résultat integer

$newChatMember protected_oe property

Optional. A new member was added to the group, information about them (this member may be bot itself)
protected User,TelegramBot\Api\Types $newChatMember
Résultat User

$newChatPhoto protected_oe property

Optional. A group photo was change to this value
protected mixed $newChatPhoto
Résultat mixed

$newChatTitle protected_oe property

Optional. A group title was changed to this value
protected string $newChatTitle
Résultat string

$photo protected_oe property

Optional. Message is a photo, available sizes of the photo array of \TelegramBot\Api\Types\Photo
protected array $photo
Résultat array

$pinnedMessage protected_oe property

Optional. Specified message was pinned.Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
protected Message,TelegramBot\Api\Types $pinnedMessage
Résultat Message

$replyToMessage protected_oe property

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.
protected Message,TelegramBot\Api\Types $replyToMessage
Résultat Message

$requiredParams protected_oe static_oe property

protected static array $requiredParams
Résultat array

$sticker protected_oe property

Optional. Message is a sticker, information about the sticker
protected Sticker,TelegramBot\Api\Types $sticker
Résultat TelegramBot\Api\Types\Sticker

$supergroupChatCreated protected_oe property

Optional. Service message: the supergroup has been created
protected bool $supergroupChatCreated
Résultat boolean

$text protected_oe property

Optional. For text messages, the actual UTF-8 text of the message
protected string $text
Résultat string

$venue protected_oe property

Optional. Message is a venue, information about the venue
protected Venue,TelegramBot\Api\Types $venue
Résultat Venue

$video protected_oe property

Optional. Message is a video, information about the video
protected Video,TelegramBot\Api\Types $video
Résultat TelegramBot\Api\Types\Video

$voice protected_oe property

Optional. Message is a voice message, information about the file
protected Voice,TelegramBot\Api\Types $voice
Résultat TelegramBot\Api\Types\Voice