-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code to reflect latest changes to the Bot API documentation
- Loading branch information
Showing
6 changed files
with
231 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* This object represents a gift that can be sent by the bot. | ||
*/ | ||
class Gift extends Type | ||
{ | ||
/** Unique identifier of the gift */ | ||
public string $id; | ||
|
||
/** The sticker that represents the gift */ | ||
public Sticker $sticker; | ||
|
||
/** The number of Telegram Stars that must be paid to send the sticker */ | ||
public int $star_count; | ||
|
||
/** <em>Optional</em>. The total number of the gifts of this type that can be sent; for limited gifts only */ | ||
public ?int $total_count = null; | ||
|
||
/** <em>Optional</em>. The number of remaining gifts of this type that can be sent; for limited gifts only */ | ||
public ?int $remaining_count = null; | ||
|
||
/** | ||
* @param string $id Unique identifier of the gift | ||
* @param Sticker $sticker The sticker that represents the gift | ||
* @param int $star_count The number of Telegram Stars that must be paid to send the sticker | ||
* @param int $total_count <em>Optional</em>. The total number of the gifts of this type that can be sent; for limited gifts only | ||
* @param int $remaining_count <em>Optional</em>. The number of remaining gifts of this type that can be sent; for limited gifts only | ||
*/ | ||
public static function make( | ||
string $id, | ||
Sticker $sticker, | ||
int $star_count, | ||
?int $total_count = null, | ||
?int $remaining_count = null, | ||
): static { | ||
return new static([ | ||
'id' => $id, | ||
'sticker' => $sticker, | ||
'star_count' => $star_count, | ||
'total_count' => $total_count, | ||
'remaining_count' => $remaining_count, | ||
]); | ||
} | ||
} |
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,32 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* This object represent a list of gifts. | ||
*/ | ||
class Gifts extends Type | ||
{ | ||
/** | ||
* The list of gifts | ||
* | ||
* @var Gift[] | ||
*/ | ||
public array $gifts; | ||
|
||
/** | ||
* @param Gift[] $gifts The list of gifts | ||
*/ | ||
public static function make(array $gifts): static | ||
{ | ||
return new static([ | ||
'gifts' => $gifts, | ||
]); | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* Describes an inline message to be sent by a user of a Mini App. | ||
*/ | ||
class PreparedInlineMessage extends Type | ||
{ | ||
/** Unique identifier of the prepared message */ | ||
public string $id; | ||
|
||
/** Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used */ | ||
public int $expiration_date; | ||
|
||
/** | ||
* @param string $id Unique identifier of the prepared message | ||
* @param int $expiration_date Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used | ||
*/ | ||
public static function make(string $id, int $expiration_date): static | ||
{ | ||
return new static([ | ||
'id' => $id, | ||
'expiration_date' => $expiration_date, | ||
]); | ||
} | ||
} |
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