From 7b8f47de438ec26be6950b15f86e47794c2fc4ac Mon Sep 17 00:00:00 2001
From: TiiFuchs <1958744+TiiFuchs@users.noreply.github.com>
Date: Mon, 9 Feb 2026 15:13:56 +0000
Subject: [PATCH] Update code to reflect latest changes to the Bot API
documentation
---
src/Layers/Generated.php | 29 ++++++++++++-
src/Telegram/ChatFullInfo.php | 6 +++
src/Telegram/ChatOwnerChanged.php | 28 +++++++++++++
src/Telegram/ChatOwnerLeft.php | 28 +++++++++++++
src/Telegram/InlineKeyboardButton.php | 14 ++++++-
src/Telegram/KeyboardButton.php | 18 ++++++--
src/Telegram/Message.php | 12 ++++++
src/Telegram/UniqueGift.php | 6 +++
src/Telegram/UniqueGiftModel.php | 13 ++++--
src/Telegram/User.php | 6 +++
src/Telegram/UserProfileAudios.php | 37 +++++++++++++++++
src/Telegram/Video.php | 10 +++++
src/Telegram/VideoQuality.php | 59 +++++++++++++++++++++++++++
src/Types/Enums/ChatActionType.php | 12 +++---
14 files changed, 263 insertions(+), 15 deletions(-)
create mode 100644 src/Telegram/ChatOwnerChanged.php
create mode 100644 src/Telegram/ChatOwnerLeft.php
create mode 100644 src/Telegram/UserProfileAudios.php
create mode 100644 src/Telegram/VideoQuality.php
diff --git a/src/Layers/Generated.php b/src/Layers/Generated.php
index aebaeb3..348f5c4 100644
--- a/src/Layers/Generated.php
+++ b/src/Layers/Generated.php
@@ -66,6 +66,7 @@
use Telepath\Telegram\Update;
use Telepath\Telegram\User;
use Telepath\Telegram\UserChatBoosts;
+use Telepath\Telegram\UserProfileAudios;
use Telepath\Telegram\UserProfilePhotos;
use Telepath\Telegram\WebhookInfo;
use Telepath\Types\Enums\ChatActionType;
@@ -1080,6 +1081,20 @@ public function getUserProfilePhotos(int $user_id, ?int $offset = null, ?int $li
return $this->raw('getUserProfilePhotos', func_get_args());
}
+ /**
+ * Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
+ *
+ * @param int $user_id Unique identifier of the target user
+ * @param int $offset Sequential number of the first audio to be returned. By default, all audios are returned.
+ * @param int $limit Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ *
+ * @throws TelegramException
+ */
+ public function getUserProfileAudios(int $user_id, ?int $offset = null, ?int $limit = null): UserProfileAudios
+ {
+ return $this->raw('getUserProfileAudios', func_get_args());
+ }
+
/**
* Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
*
@@ -1597,7 +1612,7 @@ public function getForumTopicIconStickers(): array
}
/**
- * Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
+ * Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.
*
* @param int|string $chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
* @param string $name Topic name, 1-128 characters
@@ -1924,6 +1939,18 @@ public function getMyShortDescription(?string $language_code = null): BotShortDe
return $this->raw('getMyShortDescription', func_get_args());
}
+ /**
+ * Changes the profile photo of the bot. Returns True on success.
+ *
+ * @param InputProfilePhoto $photo The new profile photo to set
+ *
+ * @throws TelegramException
+ */
+ public function setMyProfilePhoto(InputProfilePhoto $photo): bool
+ {
+ return $this->raw('setMyProfilePhoto', func_get_args());
+ }
+
/**
* Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
*
diff --git a/src/Telegram/ChatFullInfo.php b/src/Telegram/ChatFullInfo.php
index 2c092b6..a49f494 100644
--- a/src/Telegram/ChatFullInfo.php
+++ b/src/Telegram/ChatFullInfo.php
@@ -165,6 +165,9 @@ class ChatFullInfo extends Type
/** Optional. For private chats, the rating of the user if any */
public ?UserRating $rating = null;
+ /** Optional. For private chats, the first audio added to the profile of the user */
+ public ?Audio $first_profile_audio = null;
+
/** Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
public ?UniqueGiftColors $unique_gift_colors = null;
@@ -220,6 +223,7 @@ class ChatFullInfo extends Type
* @param int $linked_chat_id Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
* @param ChatLocation $location Optional. For supergroups, the location to which the supergroup is connected
* @param UserRating $rating Optional. For private chats, the rating of the user if any
+ * @param Audio $first_profile_audio Optional. For private chats, the first audio added to the profile of the user
* @param UniqueGiftColors $unique_gift_colors Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews
* @param int $paid_message_star_count Optional. The number of Telegram Stars a general user have to pay to send a message to the chat
*/
@@ -272,6 +276,7 @@ public static function make(
?int $linked_chat_id = null,
?ChatLocation $location = null,
?UserRating $rating = null,
+ ?Audio $first_profile_audio = null,
?UniqueGiftColors $unique_gift_colors = null,
?int $paid_message_star_count = null,
): static {
@@ -324,6 +329,7 @@ public static function make(
'linked_chat_id' => $linked_chat_id,
'location' => $location,
'rating' => $rating,
+ 'first_profile_audio' => $first_profile_audio,
'unique_gift_colors' => $unique_gift_colors,
'paid_message_star_count' => $paid_message_star_count,
]);
diff --git a/src/Telegram/ChatOwnerChanged.php b/src/Telegram/ChatOwnerChanged.php
new file mode 100644
index 0000000..5d858b2
--- /dev/null
+++ b/src/Telegram/ChatOwnerChanged.php
@@ -0,0 +1,28 @@
+ $new_owner,
+ ]);
+ }
+}
diff --git a/src/Telegram/ChatOwnerLeft.php b/src/Telegram/ChatOwnerLeft.php
new file mode 100644
index 0000000..5dd421f
--- /dev/null
+++ b/src/Telegram/ChatOwnerLeft.php
@@ -0,0 +1,28 @@
+Optional. The user which will be the new owner of the chat if the previous owner does not return to the chat */
+ public ?User $new_owner = null;
+
+ /**
+ * @param User $new_owner Optional. The user which will be the new owner of the chat if the previous owner does not return to the chat
+ */
+ public static function make(?User $new_owner = null): static
+ {
+ return new static([
+ 'new_owner' => $new_owner,
+ ]);
+ }
+}
diff --git a/src/Telegram/InlineKeyboardButton.php b/src/Telegram/InlineKeyboardButton.php
index 9eb9f71..77dbf64 100644
--- a/src/Telegram/InlineKeyboardButton.php
+++ b/src/Telegram/InlineKeyboardButton.php
@@ -9,13 +9,19 @@
use Telepath\Types\Type;
/**
- * This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.
+ * This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.
*/
class InlineKeyboardButton extends Type
{
/** Label text on the button */
public string $text;
+ /** Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription. */
+ public ?string $icon_custom_emoji_id = null;
+
+ /** Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used. */
+ public ?string $style = null;
+
/** Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. */
public ?string $url = null;
@@ -48,6 +54,8 @@ class InlineKeyboardButton extends Type
/**
* @param string $text Label text on the button
+ * @param string $icon_custom_emoji_id Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.
+ * @param string $style Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
* @param string $url Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.
* @param string $callback_data Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes
* @param WebAppInfo $web_app Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.
@@ -61,6 +69,8 @@ class InlineKeyboardButton extends Type
*/
public static function make(
string $text,
+ ?string $icon_custom_emoji_id = null,
+ ?string $style = null,
?string $url = null,
?string $callback_data = null,
?WebAppInfo $web_app = null,
@@ -74,6 +84,8 @@ public static function make(
): static {
return new static([
'text' => $text,
+ 'icon_custom_emoji_id' => $icon_custom_emoji_id,
+ 'style' => $style,
'url' => $url,
'callback_data' => $callback_data,
'web_app' => $web_app,
diff --git a/src/Telegram/KeyboardButton.php b/src/Telegram/KeyboardButton.php
index 7d6e3e7..38a203d 100644
--- a/src/Telegram/KeyboardButton.php
+++ b/src/Telegram/KeyboardButton.php
@@ -9,13 +9,19 @@
use Telepath\Types\Type;
/**
- * This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
+ * This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
*/
class KeyboardButton extends Type
{
- /** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed */
+ /** Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed */
public string $text;
+ /** Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription. */
+ public ?string $icon_custom_emoji_id = null;
+
+ /** Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used. */
+ public ?string $style = null;
+
/** Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. */
public ?KeyboardButtonRequestUsers $request_users = null;
@@ -35,7 +41,9 @@ class KeyboardButton extends Type
public ?WebAppInfo $web_app = null;
/**
- * @param string $text Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed
+ * @param string $text Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed
+ * @param string $icon_custom_emoji_id Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.
+ * @param string $style Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
* @param KeyboardButtonRequestUsers $request_users Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
* @param KeyboardButtonRequestChat $request_chat Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
* @param bool $request_contact Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.
@@ -45,6 +53,8 @@ class KeyboardButton extends Type
*/
public static function make(
string $text,
+ ?string $icon_custom_emoji_id = null,
+ ?string $style = null,
?KeyboardButtonRequestUsers $request_users = null,
?KeyboardButtonRequestChat $request_chat = null,
?bool $request_contact = null,
@@ -54,6 +64,8 @@ public static function make(
): static {
return new static([
'text' => $text,
+ 'icon_custom_emoji_id' => $icon_custom_emoji_id,
+ 'style' => $style,
'request_users' => $request_users,
'request_chat' => $request_chat,
'request_contact' => $request_contact,
diff --git a/src/Telegram/Message.php b/src/Telegram/Message.php
index 251723e..9786048 100644
--- a/src/Telegram/Message.php
+++ b/src/Telegram/Message.php
@@ -184,6 +184,12 @@ class Message extends MaybeInaccessibleMessage
/** Optional. A member was removed from the group, information about them (this member may be the bot itself) */
public ?User $left_chat_member = null;
+ /** Optional. Service message: chat owner has left */
+ public ?ChatOwnerLeft $chat_owner_left = null;
+
+ /** Optional. Service message: chat owner has changed */
+ public ?ChatOwnerChanged $chat_owner_changed = null;
+
/** Optional. A chat title was changed to this value */
public ?string $new_chat_title = null;
@@ -390,6 +396,8 @@ class Message extends MaybeInaccessibleMessage
* @param Location $location Optional. Message is a shared location, information about the location
* @param User[] $new_chat_members Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
* @param User $left_chat_member Optional. A member was removed from the group, information about them (this member may be the bot itself)
+ * @param ChatOwnerLeft $chat_owner_left Optional. Service message: chat owner has left
+ * @param ChatOwnerChanged $chat_owner_changed Optional. Service message: chat owner has changed
* @param string $new_chat_title Optional. A chat title was changed to this value
* @param PhotoSize[] $new_chat_photo Optional. A chat photo was change to this value
* @param bool $delete_chat_photo Optional. Service message: the chat photo was deleted
@@ -495,6 +503,8 @@ public static function make(
?Location $location = null,
?array $new_chat_members = null,
?User $left_chat_member = null,
+ ?ChatOwnerLeft $chat_owner_left = null,
+ ?ChatOwnerChanged $chat_owner_changed = null,
?string $new_chat_title = null,
?array $new_chat_photo = null,
?bool $delete_chat_photo = null,
@@ -600,6 +610,8 @@ public static function make(
'location' => $location,
'new_chat_members' => $new_chat_members,
'left_chat_member' => $left_chat_member,
+ 'chat_owner_left' => $chat_owner_left,
+ 'chat_owner_changed' => $chat_owner_changed,
'new_chat_title' => $new_chat_title,
'new_chat_photo' => $new_chat_photo,
'delete_chat_photo' => $delete_chat_photo,
diff --git a/src/Telegram/UniqueGift.php b/src/Telegram/UniqueGift.php
index b643b86..1c0e290 100644
--- a/src/Telegram/UniqueGift.php
+++ b/src/Telegram/UniqueGift.php
@@ -37,6 +37,9 @@ class UniqueGift extends Type
/** Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers */
public ?bool $is_premium = null;
+ /** Optional. True, if the gift was used to craft another gift and isn't available anymore */
+ public ?bool $is_burned = null;
+
/** Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram */
public ?bool $is_from_blockchain = null;
@@ -55,6 +58,7 @@ class UniqueGift extends Type
* @param UniqueGiftSymbol $symbol Symbol of the gift
* @param UniqueGiftBackdrop $backdrop Backdrop of the gift
* @param bool $is_premium Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers
+ * @param bool $is_burned Optional. True, if the gift was used to craft another gift and isn't available anymore
* @param bool $is_from_blockchain Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram
* @param UniqueGiftColors $colors Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only
* @param Chat $publisher_chat Optional. Information about the chat that published the gift
@@ -68,6 +72,7 @@ public static function make(
UniqueGiftSymbol $symbol,
UniqueGiftBackdrop $backdrop,
?bool $is_premium = null,
+ ?bool $is_burned = null,
?bool $is_from_blockchain = null,
?UniqueGiftColors $colors = null,
?Chat $publisher_chat = null,
@@ -81,6 +86,7 @@ public static function make(
'symbol' => $symbol,
'backdrop' => $backdrop,
'is_premium' => $is_premium,
+ 'is_burned' => $is_burned,
'is_from_blockchain' => $is_from_blockchain,
'colors' => $colors,
'publisher_chat' => $publisher_chat,
diff --git a/src/Telegram/UniqueGiftModel.php b/src/Telegram/UniqueGiftModel.php
index ec9267a..e6a2bda 100644
--- a/src/Telegram/UniqueGiftModel.php
+++ b/src/Telegram/UniqueGiftModel.php
@@ -19,20 +19,25 @@ class UniqueGiftModel extends Type
/** The sticker that represents the unique gift */
public Sticker $sticker;
- /** The number of unique gifts that receive this model for every 1000 gifts upgraded */
- public int $rarity_per_mille;
+ /** The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts. */
+ public int $rarity_per_mille = 0;
+
+ /** Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”. */
+ public ?string $rarity = null;
/**
* @param string $name Name of the model
* @param Sticker $sticker The sticker that represents the unique gift
- * @param int $rarity_per_mille The number of unique gifts that receive this model for every 1000 gifts upgraded
+ * @param int $rarity_per_mille The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.
+ * @param string $rarity Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”.
*/
- public static function make(string $name, Sticker $sticker, int $rarity_per_mille): static
+ public static function make(string $name, Sticker $sticker, int $rarity_per_mille, ?string $rarity = null): static
{
return new static([
'name' => $name,
'sticker' => $sticker,
'rarity_per_mille' => $rarity_per_mille,
+ 'rarity' => $rarity,
]);
}
}
diff --git a/src/Telegram/User.php b/src/Telegram/User.php
index a570b87..11188e9 100644
--- a/src/Telegram/User.php
+++ b/src/Telegram/User.php
@@ -55,6 +55,9 @@ class User extends Type
/** Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe. */
public ?bool $has_topics_enabled = null;
+ /** Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe. */
+ public ?bool $allows_users_to_create_topics = null;
+
/**
* @param int $id Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
* @param bool $is_bot True, if this user is a bot
@@ -70,6 +73,7 @@ class User extends Type
* @param bool $can_connect_to_business Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
* @param bool $has_main_web_app Optional. True, if the bot has a main Web App. Returned only in getMe.
* @param bool $has_topics_enabled Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.
+ * @param bool $allows_users_to_create_topics Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
*/
public static function make(
int $id,
@@ -86,6 +90,7 @@ public static function make(
?bool $can_connect_to_business = null,
?bool $has_main_web_app = null,
?bool $has_topics_enabled = null,
+ ?bool $allows_users_to_create_topics = null,
): static {
return new static([
'id' => $id,
@@ -102,6 +107,7 @@ public static function make(
'can_connect_to_business' => $can_connect_to_business,
'has_main_web_app' => $has_main_web_app,
'has_topics_enabled' => $has_topics_enabled,
+ 'allows_users_to_create_topics' => $allows_users_to_create_topics,
]);
}
}
diff --git a/src/Telegram/UserProfileAudios.php b/src/Telegram/UserProfileAudios.php
new file mode 100644
index 0000000..e939216
--- /dev/null
+++ b/src/Telegram/UserProfileAudios.php
@@ -0,0 +1,37 @@
+ $total_count,
+ 'audios' => $audios,
+ ]);
+ }
+}
diff --git a/src/Telegram/Video.php b/src/Telegram/Video.php
index b70f5b8..9fceccb 100644
--- a/src/Telegram/Video.php
+++ b/src/Telegram/Video.php
@@ -41,6 +41,13 @@ class Video extends Type
/** Optional. Timestamp in seconds from which the video will play in the message */
public ?int $start_timestamp = null;
+ /**
+ * Optional. List of available qualities of the video
+ *
+ * @var VideoQuality[]
+ */
+ public ?array $qualities = null;
+
/** Optional. Original filename as defined by the sender */
public ?string $file_name = null;
@@ -59,6 +66,7 @@ class Video extends Type
* @param PhotoSize $thumbnail Optional. Video thumbnail
* @param PhotoSize[] $cover Optional. Available sizes of the cover of the video in the message
* @param int $start_timestamp Optional. Timestamp in seconds from which the video will play in the message
+ * @param VideoQuality[] $qualities Optional. List of available qualities of the video
* @param string $file_name Optional. Original filename as defined by the sender
* @param string $mime_type Optional. MIME type of the file as defined by the sender
* @param int $file_size Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
@@ -72,6 +80,7 @@ public static function make(
?PhotoSize $thumbnail = null,
?array $cover = null,
?int $start_timestamp = null,
+ ?array $qualities = null,
?string $file_name = null,
?string $mime_type = null,
?int $file_size = null,
@@ -85,6 +94,7 @@ public static function make(
'thumbnail' => $thumbnail,
'cover' => $cover,
'start_timestamp' => $start_timestamp,
+ 'qualities' => $qualities,
'file_name' => $file_name,
'mime_type' => $mime_type,
'file_size' => $file_size,
diff --git a/src/Telegram/VideoQuality.php b/src/Telegram/VideoQuality.php
new file mode 100644
index 0000000..a352827
--- /dev/null
+++ b/src/Telegram/VideoQuality.php
@@ -0,0 +1,59 @@
+Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value. */
+ public ?int $file_size = null;
+
+ /**
+ * @param string $file_id Identifier for this file, which can be used to download or reuse the file
+ * @param string $file_unique_id Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
+ * @param int $width Video width
+ * @param int $height Video height
+ * @param string $codec Codec that was used to encode the video, for example, “h264”, “h265”, or “av01”
+ * @param int $file_size Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
+ */
+ public static function make(
+ string $file_id,
+ string $file_unique_id,
+ int $width,
+ int $height,
+ string $codec,
+ ?int $file_size = null,
+ ): static {
+ return new static([
+ 'file_id' => $file_id,
+ 'file_unique_id' => $file_unique_id,
+ 'width' => $width,
+ 'height' => $height,
+ 'codec' => $codec,
+ 'file_size' => $file_size,
+ ]);
+ }
+}
diff --git a/src/Types/Enums/ChatActionType.php b/src/Types/Enums/ChatActionType.php
index 37c36c7..670fa9d 100644
--- a/src/Types/Enums/ChatActionType.php
+++ b/src/Types/Enums/ChatActionType.php
@@ -14,16 +14,16 @@ enum ChatActionType: string
/** for photos */
case UploadPhoto = 'upload_photo';
- /** for recording videos */
+ /** for videos */
case RecordVideo = 'record_video';
- /** for uploading videos */
+ /** for videos */
case UploadVideo = 'upload_video';
- /** for recording voice notes */
+ /** for voice notes */
case RecordVoice = 'record_voice';
- /** for uploading voice notes */
+ /** for voice notes */
case UploadVoice = 'upload_voice';
/** for general files */
@@ -35,9 +35,9 @@ enum ChatActionType: string
/** for location data */
case FindLocation = 'find_location';
- /** for recording video notes */
+ /** for video notes */
case RecordVideoNote = 'record_video_note';
- /** for uploading video notes */
+ /** for video notes */
case UploadVideoNote = 'upload_video_note';
}