This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added custom method: `clearUpdates()`. It's an alias for `$this->getUpdates(-1);` - Added `TelegramLimits` class constants to get the download/upload file limit. ### Changed - Updated to __Telegram Bot API 4.1__ - You can now get the string argument at the array index position with the `getArgs()` method. Pass: - True to get an array of strings; - False to get a string; - Integer to get the string at the array index position.
- Loading branch information
Showing
10 changed files
with
185 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Luca Patera | ||
* Date: 27/08/2018 | ||
* Time: 23:30 | ||
*/ | ||
|
||
namespace TelegramBot\Constants; | ||
|
||
|
||
class TelegramLimits { | ||
|
||
/** | ||
* Download file limit in Byte. (20 MB) | ||
* For the moment, bots can download files of up to 20MB in size. | ||
*/ | ||
const DOWNLOAD=20971520; | ||
|
||
/** | ||
* Upload file limit in Byte. (50 MB) | ||
*/ | ||
const UPLOAD=52428800; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace TelegramBot\Types; | ||
|
||
/** | ||
* Represents an issue with one of the files that constitute the translation of a document. The error is considered | ||
* resolved when the file changes | ||
* @package TelegramBot\Types | ||
* @link https://core.telegram.org/bots/api#passportelementerrortranslationfile | ||
*/ | ||
class PassportElementErrorTranslationFile { | ||
|
||
/** | ||
* @var string $source Error source, must be translation_file | ||
*/ | ||
public $source; | ||
|
||
/** | ||
* @var string $type Type of element of the user's Telegram Passport which has the issue, one of “passport”, | ||
* “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, | ||
* “rental_agreement”, “passport_registration”, “temporary_registration” | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* @var string $file_hash Base64-encoded file hash | ||
*/ | ||
public $file_hash; | ||
|
||
/** | ||
* @var string $message Error message | ||
*/ | ||
public $message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace TelegramBot\Types; | ||
|
||
/** | ||
* Represents an issue with one of the files that constitute the translation of a document. The error is considered | ||
* resolved when the file changes. | ||
* @package TelegramBot\Types | ||
* @link https://core.telegram.org/bots/api#passportelementerrortranslationfiles | ||
*/ | ||
class PassportElementErrorTranslationFiles { | ||
|
||
/** | ||
* @var string $source Error source, must be translation_files | ||
*/ | ||
public $source; | ||
|
||
/** | ||
* @var string $type Type of element of the user's Telegram Passport which has the issue, one of “passport”, | ||
* “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, | ||
* “rental_agreement”, “passport_registration”, “temporary_registration” | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* @var string[] $file_hashes List of base64-encoded file hashes | ||
*/ | ||
public $file_hashes; | ||
|
||
/** | ||
* @var string $message Error message | ||
*/ | ||
public $message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace TelegramBot\Types; | ||
|
||
/** | ||
* Represents an issue in an unspecified place. The error is considered resolved when new data is added. | ||
* @package TelegramBot\Types | ||
* @link https://core.telegram.org/bots/api#passportelementerrorunspecified | ||
*/ | ||
class PassportElementErrorUnspecified { | ||
|
||
/** | ||
* @var string $source Error source, must be unspecified | ||
*/ | ||
public $source; | ||
|
||
/** | ||
* @var string $type Type of element of the user's Telegram Passport which has the issue | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* @var string $element_hash Base64-encoded element hash | ||
*/ | ||
public $element_hash; | ||
|
||
/** | ||
* @var string $message Error message | ||
*/ | ||
public $message; | ||
} |