@@ -24,7 +24,9 @@ use Longman\TelegramBot\Entities\PhotoSize;
*
* @method string getTitle() Title of the game
* @method string getDescription() Description of the game
* @method PhotoSize[] getPhoto() Photo that will be displayed in the game message in chats.
* @method string getText() Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
* @method MessageEntity[] getTextEntities() Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
* @method Animation getAnimation() Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
**/
classGameextendsEntity
...
...
@@ -35,35 +37,9 @@ class Game extends Entity
protectedfunctionsubEntities()
{
return[
'photo'=>PhotoSize::class,
'text_entities'=>MessageEntity::class,
'photo'=>[PhotoSize::class],
'text_entities'=>[MessageEntity::class],
'animation'=>Animation::class,
];
}
/**
* Photo that will be displayed in the game message in chats.
*
* This method overrides the default getPhoto method
@@ -34,10 +34,13 @@ use Longman\TelegramBot\Entities\TelegramPassport\PassportData;
* @method int getEditDate() Optional. Date the message was last edited in Unix time
* @method string getMediaGroupId() Optional. The unique identifier of a media message group this message belongs to
* @method string getAuthorSignature() Optional. Signature of the post author for messages in channels
* @method MessageEntity[] getEntities() Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
* @method MessageEntity[] getCaptionEntities() Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
* @method Audio getAudio() Optional. Message is an audio file, information about the file
* @method Document getDocument() Optional. Message is a general file, information about the file
* @method Animation getAnimation() Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
* @method Game getGame() Optional. Message is a game, information about the game.
* @method PhotoSize[] getPhoto() Optional. Message is a photo, available sizes of the photo
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
* @method Video getVideo() Optional. Message is a video, information about the video
* @method Voice getVoice() Optional. Message is a voice message, information about the file
...
...
@@ -47,8 +50,10 @@ use Longman\TelegramBot\Entities\TelegramPassport\PassportData;
* @method Location getLocation() Optional. Message is a shared location, information about the location
* @method Venue getVenue() Optional. Message is a venue, information about the venue
* @method Poll getPoll() Optional. Message is a native poll, information about the poll
* @method User[] getNewChatMembers() Optional. A new member(s) was added to the group, information about them (one of this members may be the bot itself)
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
* @method string getNewChatTitle() Optional. A chat title was changed to this value
* @method PhotoSize[] getNewChatPhoto() Optional. A chat photo was changed to this value
* @method bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
* @method bool getGroupChatCreated() Optional. Service message: the group has been created
* @method bool getSupergroupChatCreated() 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.
@@ -23,9 +23,11 @@ use Longman\TelegramBot\Entities\Entity;
* @method string getData() Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “identity_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
* @method string getPhoneNumber() Optional. User's verified phone number, available only for “phone_number” type
* @method string getEmail() Optional. User's verified email address, available only for “email” type
* @method PassportFile[] getFiles() Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getFrontSide() Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getReverseSide() Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getSelfie() Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile[] getTranslation() Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
* @method string getHash() Base64-encoded element hash for using in PassportElementErrorUnspecified
**/
classEncryptedPassportElementextendsEntity
...
...
@@ -36,37 +38,11 @@ class EncryptedPassportElement extends Entity
protectedfunctionsubEntities()
{
return[
'files'=>PassportFile::class,
'files'=>[PassportFile::class],
'front_side'=>PassportFile::class,
'reverse_side'=>PassportFile::class,
'selfie'=>PassportFile::class,
'translation'=>PassportFile::class,
'translation'=>[PassportFile::class],
];
}
/**
* Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
*
* This method overrides the default getFiles method
* and returns a nice array of PassportFile objects.
* Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
*
* This method overrides the default getTranslation method
* and returns a nice array of PassportFile objects.
* @method EncryptedPassportElement[] getData() Array with information about documents and other Telegram Passport elements that was shared with the bot
* @method EncryptedCredentials getCredentials() Encrypted credentials required to decrypt the data
**/
classPassportDataextendsEntity
...
...
@@ -29,21 +30,8 @@ class PassportData extends Entity
protectedfunctionsubEntities()
{
return[
'data'=>EncryptedPassportElement::class,
'data'=>[EncryptedPassportElement::class],
'credentials'=>EncryptedCredentials::class,
];
}
/**
* Array with information about documents and other Telegram Passport elements that was shared with the bot
*
* This method overrides the default getData method
* and returns a nice array of EncryptedPassportElement objects.