Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
161 KB
Referenced Files
None
Subscribers
None
diff --git a/src/Entities/AcceptedGiftTypes.php b/src/Entities/AcceptedGiftTypes.php
new file mode 100644
index 0000000..c6e2485
--- /dev/null
+++ b/src/Entities/AcceptedGiftTypes.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class AcceptedGiftTypes
+ *
+ * This object describes the types of gifts that can be gifted to a user or a chat.
+ *
+ * @link https://core.telegram.org/bots/api#acceptedgifttypes
+ *
+ * @method bool getUnlimitedGifts() True, if unlimited regular gifts are accepted
+ * @method bool getLimitedGifts() True, if limited regular gifts are accepted
+ * @method bool getUniqueGifts() True, if unique gifts or gifts that can be upgraded to unique for free are accepted
+ * @method bool getPremiumSubscription() True, if a Telegram Premium subscription is accepted
+ * @method bool getGiftsFromChannels() True, if transfers of unique gifts from channels are accepted
+ */
+class AcceptedGiftTypes extends Entity
+{
+}
diff --git a/src/Entities/AffiliateInfo.php b/src/Entities/AffiliateInfo.php
new file mode 100644
index 0000000..71e1952
--- /dev/null
+++ b/src/Entities/AffiliateInfo.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class AffiliateInfo
+ *
+ * This object contains information about the affiliate that received a commission via this transaction.
+ *
+ * @link https://core.telegram.org/bots/api#affiliateinfo
+ *
+ * @method User getAffiliateUser() Optional. The bot or the user that received an affiliate commission if it is a user
+ * @method Chat getAffiliateChat() Optional. The chat that received an affiliate commission if it is a chat
+ * @method int getCommissionPerMille() The number of Telegram Stars for each 1000 Telegram Stars transferred to the bot/business account
+ * @method int getAmount() Integer amount of Telegram Stars received by the affiliate
+ * @method int getNanostarAmount() Optional. The number of 1/10^9 units of Telegram Stars received by the affiliate; for affiliate program commissions only
+ */
+class AffiliateInfo extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'affiliate_user' => User::class,
+ 'affiliate_chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/Background/BackgroundFill.php b/src/Entities/Background/BackgroundFill.php
new file mode 100644
index 0000000..f4daf70
--- /dev/null
+++ b/src/Entities/Background/BackgroundFill.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities\Background;
+
+/**
+ * Class BackgroundFill
+ *
+ * The background is automatically filled based on the selected colors.
+ *
+ * @link https://core.telegram.org/bots/api#backgroundfill
+ *
+ * @method string getType() Type of the fill, always “fill”
+ * @method int getTopColor() The color of the top gradient fill as a RGB24 value
+ * @method int getBottomColor() The color of the bottom gradient fill as a RGB24 value
+ * @method int getRotationAngle() Clockwise rotation angle of the background fill in degrees; 0-359
+ */
+class BackgroundFill extends BackgroundType
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function __construct(array $data = [])
+ {
+ $data['type'] = 'fill';
+ parent::__construct($data);
+ }
+}
diff --git a/src/Entities/Background/BackgroundType.php b/src/Entities/Background/BackgroundType.php
new file mode 100644
index 0000000..6488235
--- /dev/null
+++ b/src/Entities/Background/BackgroundType.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities\Background;
+
+use Longman\TelegramBot\Entities\Entity;
+
+/**
+ * Class BackgroundType
+ *
+ * This object represents the type of a background. Currently, it can be one of
+ * - BackgroundTypeFill
+ * - BackgroundTypeWallpaper
+ * - BackgroundTypePattern
+ * - BackgroundTypeChatTheme
+ *
+ * @link https://core.telegram.org/bots/api#backgroundtype
+ *
+ * @method string getType() Type of the background
+ */
+class BackgroundType extends Entity
+{
+ // Further specific properties depend on the actual type of background,
+ // which will be handled by subclasses or by checking the 'type' field.
+ // For example, BackgroundTypeFill, BackgroundTypeWallpaper, etc.
+}
diff --git a/src/Entities/Birthdate.php b/src/Entities/Birthdate.php
new file mode 100644
index 0000000..4992897
--- /dev/null
+++ b/src/Entities/Birthdate.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class Birthdate
+ *
+ * Represents a birthdate of a user.
+ *
+ * @link https://core.telegram.org/bots/api#birthdate
+ *
+ * @method int getDay() Day of the month; 1-31
+ * @method int getMonth() Month of the year; 1-12
+ * @method int getYear() Optional. Year of birth; 1900-2100
+ */
+class Birthdate extends Entity
+{
+
+}
diff --git a/src/Entities/BotAccessSettings.php b/src/Entities/BotAccessSettings.php
new file mode 100644
index 0000000..4c84562
--- /dev/null
+++ b/src/Entities/BotAccessSettings.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BotAccessSettings
+ *
+ * This object contains information about the bot's access settings.
+ *
+ * @link https://core.telegram.org/bots/api#botaccesssettings
+ *
+ * @method bool getCanJoinGroups() True, if the bot can be invited to groups
+ * @method bool getCanReadAllGroupMessages() True, if privacy mode is disabled for the bot
+ * @method bool getHasTopicsEnabled() True, if the bot has forum topic mode enabled in private chats
+ * @method bool getCanManageBots() True, if the user is allowed to create, edit, or delete managed bots.
+ * @method bool getSupportsGuestQueries() True, if the bot supports guest queries.
+ */
+class BotAccessSettings extends Entity
+{
+
+}
diff --git a/src/Entities/BottomButton.php b/src/Entities/BottomButton.php
new file mode 100644
index 0000000..28b2144
--- /dev/null
+++ b/src/Entities/BottomButton.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BottomButton
+ *
+ * This object describes a bottom button of a chat.
+ *
+ * @link https://core.telegram.org/bots/api#bottombutton
+ *
+ * @method string getText() Label text on the button
+ * @method WebAppInfo getWebApp() Optional. Description of the Web App that will be launched when the user presses the button.
+ * @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the button icon.
+ */
+class BottomButton extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'web_app' => WebAppInfo::class,
+ ];
+ }
+}
diff --git a/src/Entities/BusinessBotRights.php b/src/Entities/BusinessBotRights.php
new file mode 100644
index 0000000..7fde385
--- /dev/null
+++ b/src/Entities/BusinessBotRights.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessBotRights
+ *
+ * Represents the rights of a business bot.
+ *
+ * @link https://core.telegram.org/bots/api#businessbotrights
+ *
+ * @method bool getCanReply() Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours
+ * @method bool getCanReadMessages() Optional. True, if the bot can mark incoming private messages as read
+ * @method bool getCanDeleteSentMessages() Optional. True, if the bot can delete messages sent by the bot
+ * @method bool getCanDeleteAllMessages() Optional. True, if the bot can delete all private messages in managed chats
+ * @method bool getCanEditName() Optional. True, if the bot can edit the first and last name of the business account
+ * @method bool getCanEditBio() Optional. True, if the bot can edit the bio of the business account
+ * @method bool getCanEditProfilePhoto() Optional. True, if the bot can edit the profile photo of the business account
+ * @method bool getCanEditUsername() Optional. True, if the bot can edit the username of the business account
+ * @method bool getCanChangeGiftSettings() Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account
+ * @method bool getCanViewGiftsAndStars() Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account
+ * @method bool getCanConvertGiftsToStars() Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars
+ * @method bool getCanTransferAndUpgradeGifts() Optional. True, if the bot can transfer and upgrade gifts owned by the business account
+ * @method bool getCanTransferStars() Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts
+ * @method bool getCanManageStories() Optional. True, if the bot can post, edit and delete stories on behalf of the business account
+ * @method bool getCanManageChecklists() Optional. True, if the bot can send and edit checklists on behalf of the business account
+ *
+ * @method $this setCanReply(bool $can_reply)
+ * @method $this setCanReadMessages(bool $can_read_messages)
+ * @method $this setCanDeleteSentMessages(bool $can_delete_sent_messages)
+ * @method $this setCanDeleteAllMessages(bool $can_delete_all_messages)
+ * @method $this setCanEditName(bool $can_edit_name)
+ * @method $this setCanEditBio(bool $can_edit_bio)
+ * @method $this setCanEditProfilePhoto(bool $can_edit_profile_photo)
+ * @method $this setCanEditUsername(bool $can_edit_username)
+ * @method $this setCanChangeGiftSettings(bool $can_change_gift_settings)
+ * @method $this setCanViewGiftsAndStars(bool $can_view_gifts_and_stars)
+ * @method $this setCanConvertGiftsToStars(bool $can_convert_gifts_to_stars)
+ * @method $this setCanTransferAndUpgradeGifts(bool $can_transfer_and_upgrade_gifts)
+ * @method $this setCanTransferStars(bool $can_transfer_stars)
+ * @method $this setCanManageStories(bool $can_manage_stories)
+ * @method $this setCanManageChecklists(bool $can_manage_checklists)
+ */
+class BusinessBotRights extends Entity
+{
+}
diff --git a/src/Entities/BusinessConnection.php b/src/Entities/BusinessConnection.php
new file mode 100644
index 0000000..fa1249d
--- /dev/null
+++ b/src/Entities/BusinessConnection.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessConnection
+ *
+ * Describes the connection of the bot with a business account.
+ *
+ * @link https://core.telegram.org/bots/api#businessconnection
+ *
+ * @method string getId() Unique identifier of the business connection
+ * @method User getUser() Business account user that created the business connection
+ * @method int getUserChatId() Business account user identifier that created the business connection
+ * @method int getDate() Date the connection was established in Unix time
+ * @method bool getIsEnabled() True, if the business connection is active
+ * @method BusinessBotRights getRights() Optional. Rights of the business bot
+ */
+class BusinessConnection extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'user' => User::class,
+ 'rights' => BusinessBotRights::class,
+ ];
+ }
+}
diff --git a/src/Entities/BusinessIntro.php b/src/Entities/BusinessIntro.php
new file mode 100644
index 0000000..55f804e
--- /dev/null
+++ b/src/Entities/BusinessIntro.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessIntro
+ *
+ * Describes the introductory message of a business account.
+ *
+ * @link https://core.telegram.org/bots/api#businessintro
+ *
+ * @method string getTitle() Optional. Title text of the business intro
+ * @method string getMessage() Optional. Message text of the business intro
+ * @method Sticker getSticker() Optional. Sticker of the business intro
+ */
+class BusinessIntro extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'sticker' => Sticker::class,
+ ];
+ }
+}
diff --git a/src/Entities/BusinessLocation.php b/src/Entities/BusinessLocation.php
new file mode 100644
index 0000000..ee32761
--- /dev/null
+++ b/src/Entities/BusinessLocation.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessLocation
+ *
+ * Contains information about the location of a business.
+ *
+ * @link https://core.telegram.org/bots/api#businesslocation
+ *
+ * @method string getAddress() Address of the business
+ * @method Location getLocation() Optional. Location of the business
+ */
+class BusinessLocation extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'location' => Location::class,
+ ];
+ }
+}
diff --git a/src/Entities/BusinessMessagesDeleted.php b/src/Entities/BusinessMessagesDeleted.php
new file mode 100644
index 0000000..45f9ed5
--- /dev/null
+++ b/src/Entities/BusinessMessagesDeleted.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessMessagesDeleted
+ *
+ * This object is received when messages are deleted from a business account.
+ *
+ * @link https://core.telegram.org/bots/api#businessmessagesdeleted
+ *
+ * @method string getBusinessConnectionId() Unique identifier of the business connection
+ * @method Chat getChat() Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.
+ * @method int[] getMessageIds() A list of identifiers of deleted messages in the chat of the business account
+ */
+class BusinessMessagesDeleted extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/BusinessOpeningHours.php b/src/Entities/BusinessOpeningHours.php
new file mode 100644
index 0000000..9c21838
--- /dev/null
+++ b/src/Entities/BusinessOpeningHours.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessOpeningHours
+ *
+ * Describes the opening hours of a business.
+ *
+ * @link https://core.telegram.org/bots/api#businessopeninghours
+ *
+ * @method string getTimeZoneName() Unique name of the time zone for which the opening hours are defined
+ * @method BusinessOpeningHoursInterval[] getOpeningHours() List of time intervals describing business opening hours
+ */
+class BusinessOpeningHours extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'opening_hours' => [BusinessOpeningHoursInterval::class],
+ ];
+ }
+}
diff --git a/src/Entities/BusinessOpeningHoursInterval.php b/src/Entities/BusinessOpeningHoursInterval.php
new file mode 100644
index 0000000..000c694
--- /dev/null
+++ b/src/Entities/BusinessOpeningHoursInterval.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class BusinessOpeningHoursInterval
+ *
+ * Describes an interval of time during which a business is open.
+ *
+ * @link https://core.telegram.org/bots/api#businessopeninghoursinterval
+ *
+ * @method int getOpeningMinute() The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60
+ * @method int getClosingMinute() The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60
+ */
+class BusinessOpeningHoursInterval extends Entity
+{
+
+}
diff --git a/src/Entities/ChatBackground.php b/src/Entities/ChatBackground.php
new file mode 100644
index 0000000..40f1859
--- /dev/null
+++ b/src/Entities/ChatBackground.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+use Longman\TelegramBot\Entities\Background\BackgroundType;
+
+/**
+ * Class ChatBackground
+ *
+ * This object represents a chat background.
+ *
+ * @link https://core.telegram.org/bots/api#chatbackground
+ *
+ * @method BackgroundType getType() Type of the background
+ */
+class ChatBackground extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'type' => BackgroundType::class,
+ ];
+ }
+}
diff --git a/src/Entities/ChatFullInfo.php b/src/Entities/ChatFullInfo.php
new file mode 100644
index 0000000..2c6ddfb
--- /dev/null
+++ b/src/Entities/ChatFullInfo.php
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChatFullInfo
+ *
+ * This object contains full information about a chat.
+ *
+ * @link https://core.telegram.org/bots/api#chatfullinfo
+ *
+ * @method string getDescription() Optional. Description, for groups, supergroups and channel chats.
+ * @method string getInviteLink() Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
+ * @method Message getPinnedMessage() Optional. The most recent pinned message (by sending date). Returned only in getChat.
+ * @method ChatPermissions getPermissions() Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
+ * @method int getSlowModeDelay() Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat.
+ * @method int getUnrestrictBoostCount() Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions.
+ * @method int getMessageAutoDeleteTime() Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
+ * @method bool getHasAggressiveAntiSpamEnabled() Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.
+ * @method User getGuardBot() Optional. The bot that is serving as the guard bot for the chat. Returned only in getChat.
+ * @method bool getHasHiddenMembers() Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.
+ * @method bool getHasProtectedContent() Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
+ * @method bool getHasVisibleHistory() Optional. True, if new chat members will have access to old messages; available only to chat administrators.
+ * @method string getStickerSetName() Optional. For supergroups, name of group sticker set. Returned only in getChat.
+ * @method bool getCanSetStickerSet() Optional. True, if the bot can change the group sticker set. Returned only in getChat.
+ * @method string getCustomEmojiStickerSetName() Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
+ * @method int getLinkedChatId() Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only in getChat.
+ * @method Chat getParentChat() Optional. Information about the corresponding channel chat; for direct messages chats only
+ * @method ChatLocation getLocation() Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
+ * @method UserRating getRating() Optional. For private chats, the rating of the user if any
+ * @method UniqueGiftColors getUniqueGiftColors() Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews
+ * @method int getMaxReactionCount() Optional. The maximum number of reactions that can be set on a message in the chat
+ * @method AcceptedGiftTypes getAcceptedGiftTypes() Optional. Information about types of gifts that are accepted by the chat or by the corresponding user for private chats
+ * @method bool getCanSendPaidMedia() Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.
+ * @method int getPaidMessageStarCount() Optional. The number of Telegram Stars a general user have to pay to send a message to the chat
+ * @method Audio getFirstProfileAudio() Optional. The first audio in the user's profile
+ */
+class ChatFullInfo extends Chat
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return array_merge(parent::subEntities(), [
+ 'parent_chat' => Chat::class,
+ 'rating' => UserRating::class,
+ 'unique_gift_colors' => UniqueGiftColors::class,
+ 'accepted_gift_types' => AcceptedGiftTypes::class,
+ 'guard_bot' => User::class,
+ 'first_profile_audio' => Audio::class,
+ ]);
+ }
+}
diff --git a/src/Entities/ChatOwnerChanged.php b/src/Entities/ChatOwnerChanged.php
new file mode 100644
index 0000000..cbd8c4e
--- /dev/null
+++ b/src/Entities/ChatOwnerChanged.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChatOwnerChanged
+ *
+ * This object represents a service message about the chat owner changing.
+ *
+ * @link https://core.telegram.org/bots/api#chatownerchanged
+ *
+ * @method User getOldOwner() User that left the chat
+ * @method User getNewOwner() New owner of the chat
+ * @method Chat getChat() Chat
+ */
+class ChatOwnerChanged extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'old_owner' => User::class,
+ 'new_owner' => User::class,
+ 'chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/ChatOwnerLeft.php b/src/Entities/ChatOwnerLeft.php
new file mode 100644
index 0000000..328a642
--- /dev/null
+++ b/src/Entities/ChatOwnerLeft.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChatOwnerLeft
+ *
+ * This object represents a service message about the chat owner leaving the chat.
+ *
+ * @link https://core.telegram.org/bots/api#chatownerleft
+ *
+ * @method User getOldOwner() User that left the chat
+ * @method Chat getChat() Chat
+ */
+class ChatOwnerLeft extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'old_owner' => User::class,
+ 'chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/Checklist.php b/src/Entities/Checklist.php
new file mode 100644
index 0000000..514ad17
--- /dev/null
+++ b/src/Entities/Checklist.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class Checklist
+ *
+ * Describes a checklist.
+ *
+ * @link https://core.telegram.org/bots/api#checklist
+ *
+ * @method string getTitle() Title of the checklist
+ * @method MessageEntity[] getTitleEntities() Optional. Special entities that appear in the checklist title
+ * @method ChecklistTask[] getTasks() List of tasks in the checklist
+ * @method bool getOthersCanAddTasks() Optional. True, if users other than the creator of the list can add tasks to the list
+ * @method bool getOthersCanMarkTasksAsDone() Optional. True, if users other than the creator of the list can mark tasks as done or not done
+ */
+class Checklist extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'title_entities' => [MessageEntity::class],
+ 'tasks' => [ChecklistTask::class],
+ ];
+ }
+}
diff --git a/src/Entities/ChecklistTask.php b/src/Entities/ChecklistTask.php
new file mode 100644
index 0000000..6d00839
--- /dev/null
+++ b/src/Entities/ChecklistTask.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChecklistTask
+ *
+ * Describes a task in a checklist.
+ *
+ * @link https://core.telegram.org/bots/api#checklisttask
+ *
+ * @method int getId() Unique identifier of the task
+ * @method string getText() Text of the task
+ * @method MessageEntity[] getTextEntities() Optional. Special entities that appear in the task text
+ * @method User getCompletedByUser() Optional. User that completed the task; omitted if the task wasn't completed by a user
+ * @method Chat getCompletedByChat() Optional. Chat that completed the task; omitted if the task wasn't completed by a chat
+ * @method int getCompletionDate() Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed
+ */
+class ChecklistTask extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text_entities' => [MessageEntity::class],
+ 'completed_by_user' => User::class,
+ 'completed_by_chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/ChecklistTasksAdded.php b/src/Entities/ChecklistTasksAdded.php
new file mode 100644
index 0000000..60d2f86
--- /dev/null
+++ b/src/Entities/ChecklistTasksAdded.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChecklistTasksAdded
+ *
+ * Describes a service message about tasks added to a checklist.
+ *
+ * @link https://core.telegram.org/bots/api#checklisttasksadded
+ *
+ * @method Message getChecklistMessage() Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
+ * @method ChecklistTask[] getTasks() List of tasks added to the checklist
+ */
+class ChecklistTasksAdded extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'checklist_message' => Message::class,
+ 'tasks' => [ChecklistTask::class],
+ ];
+ }
+}
diff --git a/src/Entities/ChecklistTasksDone.php b/src/Entities/ChecklistTasksDone.php
new file mode 100644
index 0000000..b6cf072
--- /dev/null
+++ b/src/Entities/ChecklistTasksDone.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ChecklistTasksDone
+ *
+ * Describes a service message about checklist tasks marked as done or not done.
+ *
+ * @link https://core.telegram.org/bots/api#checklisttasksdone
+ *
+ * @method Message getChecklistMessage() Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
+ * @method int[] getMarkedAsDoneTaskIds() Optional. Identifiers of the tasks that were marked as done
+ * @method int[] getMarkedAsNotDoneTaskIds() Optional. Identifiers of the tasks that were marked as not done
+ */
+class ChecklistTasksDone extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'checklist_message' => Message::class,
+ ];
+ }
+}
diff --git a/src/Entities/CopyTextButton.php b/src/Entities/CopyTextButton.php
new file mode 100644
index 0000000..6db8e7d
--- /dev/null
+++ b/src/Entities/CopyTextButton.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class CopyTextButton
+ *
+ * This object represents an inline keyboard button that copies specified text to the clipboard.
+ *
+ * @link https://core.telegram.org/bots/api#copytextbutton
+ *
+ * @method string getText() The text to be copied to the clipboard; 1-256 characters
+ */
+class CopyTextButton extends Entity
+{
+}
diff --git a/src/Entities/DirectMessagePriceChanged.php b/src/Entities/DirectMessagePriceChanged.php
new file mode 100644
index 0000000..7a2ebb5
--- /dev/null
+++ b/src/Entities/DirectMessagePriceChanged.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class DirectMessagePriceChanged
+ *
+ * Describes a service message about a change in the price of direct messages sent to a channel chat.
+ *
+ * @link https://core.telegram.org/bots/api#directmessagepricechanged
+ *
+ * @method bool getAreDirectMessagesEnabled() True, if direct messages are enabled for the channel chat; false otherwise
+ * @method int getDirectMessageStarCount() Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.
+ */
+class DirectMessagePriceChanged extends Entity
+{
+}
diff --git a/src/Entities/DirectMessagesTopic.php b/src/Entities/DirectMessagesTopic.php
new file mode 100644
index 0000000..8632f0b
--- /dev/null
+++ b/src/Entities/DirectMessagesTopic.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class DirectMessagesTopic
+ *
+ * This object describes a topic of a direct messages chat.
+ *
+ * @link https://core.telegram.org/bots/api#directmessagestopic
+ *
+ * @method int getMessageThreadId() Unique identifier of the direct messages chat topic
+ * @method string getName() Name of the topic
+ * @method int getIconColor() Color of the topic icon in RGB format
+ * @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the topic icon
+ */
+class DirectMessagesTopic extends Entity
+{
+}
diff --git a/src/Entities/ForumTopic.php b/src/Entities/ForumTopic.php
new file mode 100644
index 0000000..489306c
--- /dev/null
+++ b/src/Entities/ForumTopic.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ForumTopic
+ *
+ * This object represents a forum topic.
+ *
+ * @link https://core.telegram.org/bots/api#forumtopic
+ *
+ * @method int getMessageThreadId() Unique identifier of the forum topic
+ * @method string getName() Name of the topic
+ * @method int getIconColor() Color of the topic icon in RGB format
+ * @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the topic icon
+ * @method bool getIsNameImplicit() Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot
+ */
+class ForumTopic extends Entity
+{
+}
diff --git a/src/Entities/Gift.php b/src/Entities/Gift.php
new file mode 100644
index 0000000..5812e7c
--- /dev/null
+++ b/src/Entities/Gift.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class Gift
+ *
+ * This object represents a gift that can be sent by the bot.
+ *
+ * @link https://core.telegram.org/bots/api#gift
+ *
+ * @method string getId() Unique identifier of the gift
+ * @method Sticker getSticker() The sticker that represents the gift
+ * @method int getStarCount() The number of Telegram Stars that must be paid to send the sticker
+ * @method int getUpgradeStarCount() Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one
+ * @method bool getIsPremium() Optional. True, if the gift can only be purchased by Telegram Premium subscribers
+ * @method bool getHasColors() Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance
+ * @method int getTotalCount() Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only
+ * @method int getRemainingCount() Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only
+ * @method int getPersonalTotalCount() Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only
+ * @method int getPersonalRemainingCount() Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only
+ * @method GiftBackground getBackground() Optional. Background of the gift
+ * @method int getUniqueGiftVariantCount() Optional. The total number of different unique gifts that can be obtained by upgrading the gift
+ * @method Chat getPublisherChat() Optional. Information about the chat that published the gift
+ */
+class Gift extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'sticker' => Sticker::class,
+ 'background' => GiftBackground::class,
+ 'publisher_chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/GiftBackground.php b/src/Entities/GiftBackground.php
new file mode 100644
index 0000000..0882eec
--- /dev/null
+++ b/src/Entities/GiftBackground.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class GiftBackground
+ *
+ * This object describes the background of a gift.
+ *
+ * @link https://core.telegram.org/bots/api#giftbackground
+ *
+ * @method int getCenterColor() Center color of the background in RGB format
+ * @method int getEdgeColor() Edge color of the background in RGB format
+ * @method int getTextColor() Text color of the background in RGB format
+ * @method string getRarity() Optional. The rarity of the gift background
+ */
+class GiftBackground extends Entity
+{
+}
diff --git a/src/Entities/GiftInfo.php b/src/Entities/GiftInfo.php
new file mode 100644
index 0000000..f1744fb
--- /dev/null
+++ b/src/Entities/GiftInfo.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class GiftInfo
+ *
+ * Describes a service message about a regular gift that was sent or received.
+ *
+ * @link https://core.telegram.org/bots/api#giftinfo
+ *
+ * @method Gift getGift() Information about the gift
+ * @method string getOwnedGiftId() Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
+ * @method int getConvertStarCount() Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible
+ * @method int getPrepaidUpgradeStarCount() Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift
+ * @method bool getIsUpgradeSeparate() Optional. True, if the gift's upgrade was purchased after the gift was sent
+ * @method bool getCanBeUpgraded() Optional. True, if the gift can be upgraded to a unique gift
+ * @method string getText() Optional. Text of the message that was added to the gift
+ * @method MessageEntity[] getEntities() Optional. Special entities that appear in the text
+ * @method bool getIsPrivate() Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
+ * @method int getUniqueGiftNumber() Optional. Unique number reserved for this gift when upgraded
+ */
+class GiftInfo extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'gift' => Gift::class,
+ 'entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/Gifts.php b/src/Entities/Gifts.php
new file mode 100644
index 0000000..2c17def
--- /dev/null
+++ b/src/Entities/Gifts.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class Gifts
+ *
+ * This object represent a list of gifts.
+ *
+ * @link https://core.telegram.org/bots/api#gifts
+ *
+ * @method Gift[] getGifts() The list of gifts
+ */
+class Gifts extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'gifts' => [Gift::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputChecklist.php b/src/Entities/InputChecklist.php
new file mode 100644
index 0000000..24d7b84
--- /dev/null
+++ b/src/Entities/InputChecklist.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputChecklist
+ *
+ * Describes a checklist to create.
+ *
+ * @link https://core.telegram.org/bots/api#inputchecklist
+ *
+ * @method string getTitle() Title of the checklist; 1-255 characters after entities parsing
+ * @method string getParseMode() Optional. Mode for parsing entities in the title. See formatting options for more details.
+ * @method MessageEntity[] getTitleEntities() Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
+ * @method InputChecklistTask[] getTasks() List of 1-30 tasks in the checklist
+ * @method bool getOthersCanAddTasks() Optional. Pass True if other users can add tasks to the checklist
+ * @method bool getOthersCanMarkTasksAsDone() Optional. Pass True if other users can mark tasks as done or not done in the checklist
+ */
+class InputChecklist extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'title_entities' => [MessageEntity::class],
+ 'tasks' => [InputChecklistTask::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputChecklistTask.php b/src/Entities/InputChecklistTask.php
new file mode 100644
index 0000000..b2e51c1
--- /dev/null
+++ b/src/Entities/InputChecklistTask.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputChecklistTask
+ *
+ * Describes a task to add to a checklist.
+ *
+ * @link https://core.telegram.org/bots/api#inputchecklisttask
+ *
+ * @method int getId() Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist
+ * @method string getText() Text of the task; 1-100 characters after entities parsing
+ * @method string getParseMode() Optional. Mode for parsing entities in the text. See formatting options for more details.
+ * @method MessageEntity[] getTextEntities() Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
+ */
+class InputChecklistTask extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputMedia/InputMediaLink.php b/src/Entities/InputMedia/InputMediaLink.php
new file mode 100644
index 0000000..da17ec1
--- /dev/null
+++ b/src/Entities/InputMedia/InputMediaLink.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\InputMedia;
+
+use Longman\TelegramBot\Entities\Entity;
+
+/**
+ * Class InputMediaLink
+ *
+ * @link https://core.telegram.org/bots/api#inputmedialink
+ *
+ * @method string getType() Type of the result, must be link
+ * @method string getUrl() URL of the link
+ */
+class InputMediaLink extends Entity implements InputMedia
+{
+}
diff --git a/src/Entities/InputMediaLivePhoto.php b/src/Entities/InputMediaLivePhoto.php
new file mode 100644
index 0000000..c511a90
--- /dev/null
+++ b/src/Entities/InputMediaLivePhoto.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputMediaLivePhoto
+ *
+ * Represents a live photo to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputmedialivephoto
+ *
+ * @method string getType() Type of the result, must be live_photo
+ * @method string getMedia() File to send
+ * @method string getThumbnail() Optional. Thumbnail of the file sent
+ * @method string getCaption() Optional. Caption of the live photo to be sent, 0-1024 characters after entities parsing
+ * @method string getCaptionParseMode() Optional. Mode for parsing entities in the live photo caption.
+ * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption
+ * @method bool getShowCaptionAboveMedia() Optional. Pass True, if the caption must be shown above the message media
+ * @method bool getHasSpoiler() Optional. Pass True if the photo needs to be covered with a spoiler animation
+ */
+class InputMediaLivePhoto extends InputMedia
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputMediaLocation.php b/src/Entities/InputMediaLocation.php
new file mode 100644
index 0000000..acac6a6
--- /dev/null
+++ b/src/Entities/InputMediaLocation.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputMediaLocation
+ *
+ * Represents a location to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputmedialocation
+ *
+ * @method string getType() Type of the result, must be location
+ * @method float getLatitude() Latitude of the location
+ * @method float getLongitude() Longitude of the location
+ * @method float getHorizontalAccuracy() Optional. The radius of uncertainty for the location, measured in meters; 0-1500
+ * @method int getLivePeriod() Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
+ * @method int getHeading() Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ * @method int getProximityAlertRadius() Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ */
+class InputMediaLocation extends InputMedia
+{
+
+}
diff --git a/src/Entities/InputMediaSticker.php b/src/Entities/InputMediaSticker.php
new file mode 100644
index 0000000..b1aa5bc
--- /dev/null
+++ b/src/Entities/InputMediaSticker.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputMediaSticker
+ *
+ * Represents a sticker to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputmediasticker
+ *
+ * @method string getType() Type of the result, must be sticker
+ * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
+ */
+class InputMediaSticker extends InputMedia
+{
+
+}
diff --git a/src/Entities/InputMediaVenue.php b/src/Entities/InputMediaVenue.php
new file mode 100644
index 0000000..56db79f
--- /dev/null
+++ b/src/Entities/InputMediaVenue.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputMediaVenue
+ *
+ * Represents a venue to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputmediavenue
+ *
+ * @method string getType() Type of the result, must be venue
+ * @method float getLatitude() Latitude of the venue
+ * @method float getLongitude() Longitude of the venue
+ * @method string getTitle() Name of the venue
+ * @method string getAddress() Address of the venue
+ * @method string getFoursquareId() Optional. Foursquare identifier of the venue
+ * @method string getFoursquareType() Optional. Foursquare type of the venue, if known.
+ * @method string getGooglePlaceId() Optional. Google Places identifier of the venue
+ * @method string getGooglePlaceType() Optional. Google Places type of the venue.
+ */
+class InputMediaVenue extends InputMedia
+{
+
+}
diff --git a/src/Entities/InputMessageContent/InputRichMessageContent.php b/src/Entities/InputMessageContent/InputRichMessageContent.php
new file mode 100644
index 0000000..8b47582
--- /dev/null
+++ b/src/Entities/InputMessageContent/InputRichMessageContent.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\InputMessageContent;
+
+use Longman\TelegramBot\Entities\Entity;
+use Longman\TelegramBot\Entities\RichBlock\RichBlock;
+
+/**
+ * Class InputRichMessageContent
+ *
+ * @link https://core.telegram.org/bots/api#inputrichmessagecontent
+ *
+ * @method RichBlock[] getBlocks() Array of blocks forming the message
+ */
+class InputRichMessageContent extends Entity implements InputMessageContent
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputPaidMediaLivePhoto.php b/src/Entities/InputPaidMediaLivePhoto.php
new file mode 100644
index 0000000..c9bd3af
--- /dev/null
+++ b/src/Entities/InputPaidMediaLivePhoto.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputPaidMediaLivePhoto
+ *
+ * The paid media to send is a live photo.
+ *
+ * @link https://core.telegram.org/bots/api#inputpaidmedialivephoto
+ *
+ * @method string getType() Type of the media, must be live_photo
+ * @method string getMedia() File to send
+ * @method string getThumbnail() Optional. Thumbnail of the file sent
+ */
+class InputPaidMediaLivePhoto extends InputPaidMedia
+{
+
+}
diff --git a/src/Entities/InputPollMedia.php b/src/Entities/InputPollMedia.php
new file mode 100644
index 0000000..311a7cd
--- /dev/null
+++ b/src/Entities/InputPollMedia.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputPollMedia
+ *
+ * This object represents media to be added to a poll.
+ *
+ * @link https://core.telegram.org/bots/api#inputpollmedia
+ */
+class InputPollMedia extends Entity
+{
+
+}
diff --git a/src/Entities/InputPollOption.php b/src/Entities/InputPollOption.php
new file mode 100644
index 0000000..6a76aec
--- /dev/null
+++ b/src/Entities/InputPollOption.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputPollOption
+ *
+ * This object contains information about one answer option in a poll to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputpolloption
+ *
+ * @method string getText() Option text, 1-100 characters
+ * @method string getTextParseMode() Optional. Mode for parsing entities in the text. See formatting options for more details.
+ * @method MessageEntity[] getTextEntities() Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode
+ * @method InputPollOptionMedia getMedia() Optional. Media to show for the option
+ */
+class InputPollOption extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputPollOptionMedia.php b/src/Entities/InputPollOptionMedia.php
new file mode 100644
index 0000000..6702b0b
--- /dev/null
+++ b/src/Entities/InputPollOptionMedia.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputPollOptionMedia
+ *
+ * This object represents media to be added to a poll option.
+ *
+ * @link https://core.telegram.org/bots/api#inputpolloptionmedia
+ */
+class InputPollOptionMedia extends Entity
+{
+
+}
diff --git a/src/Entities/InputProfilePhoto.php b/src/Entities/InputProfilePhoto.php
new file mode 100644
index 0000000..9988410
--- /dev/null
+++ b/src/Entities/InputProfilePhoto.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputProfilePhoto
+ *
+ * This object describes a profile photo to set. Currently, it can be one of
+ * - InputProfilePhotoStatic
+ * - InputProfilePhotoAnimated
+ *
+ * @link https://core.telegram.org/bots/api#inputprofilephoto
+ */
+class InputProfilePhoto extends Entity
+{
+}
diff --git a/src/Entities/InputRichMessage.php b/src/Entities/InputRichMessage.php
new file mode 100644
index 0000000..f1fa031
--- /dev/null
+++ b/src/Entities/InputRichMessage.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+use Longman\TelegramBot\Entities\RichBlock\RichBlock;
+
+/**
+ * Class InputRichMessage
+ *
+ * @link https://core.telegram.org/bots/api#inputrichmessage
+ *
+ * @method RichBlock[] getBlocks() Array of blocks forming the message
+ */
+class InputRichMessage extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/InputStoryContent.php b/src/Entities/InputStoryContent.php
new file mode 100644
index 0000000..8b22d8b
--- /dev/null
+++ b/src/Entities/InputStoryContent.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputStoryContent
+ *
+ * This object describes the content of a story to post. Currently, it can be one of
+ * - InputStoryContentPhoto
+ * - InputStoryContentVideo
+ *
+ * @link https://core.telegram.org/bots/api#inputstorycontent
+ */
+class InputStoryContent extends Entity
+{
+}
diff --git a/src/Entities/InputStoryContentPhoto.php b/src/Entities/InputStoryContentPhoto.php
new file mode 100644
index 0000000..892f28c
--- /dev/null
+++ b/src/Entities/InputStoryContentPhoto.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputStoryContentPhoto
+ *
+ * Describes a photo to post as a story.
+ *
+ * @link https://core.telegram.org/bots/api#inputstorycontentphoto
+ *
+ * @method string getType() Type of the content, must be photo
+ * @method string getPhoto() The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>.
+ */
+class InputStoryContentPhoto extends InputStoryContent
+{
+}
diff --git a/src/Entities/InputStoryContentVideo.php b/src/Entities/InputStoryContentVideo.php
new file mode 100644
index 0000000..17caf53
--- /dev/null
+++ b/src/Entities/InputStoryContentVideo.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class InputStoryContentVideo
+ *
+ * Describes a video to post as a story.
+ *
+ * @link https://core.telegram.org/bots/api#inputstorycontentvideo
+ *
+ * @method string getType() Type of the content, must be video
+ * @method string getVideo() The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the video was uploaded using multipart/form-data under <file_attach_name>.
+ * @method float getDuration() Optional. Precise duration of the video in seconds; 0-60
+ * @method float getCoverFrameTimestamp() Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.
+ * @method bool getIsAnimation() Optional. Pass True if the video has no sound
+ */
+class InputStoryContentVideo extends InputStoryContent
+{
+}
diff --git a/src/Entities/KeyboardButtonRequestManagedBot.php b/src/Entities/KeyboardButtonRequestManagedBot.php
new file mode 100644
index 0000000..f54c507
--- /dev/null
+++ b/src/Entities/KeyboardButtonRequestManagedBot.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class KeyboardButtonRequestManagedBot
+ *
+ * This object defines the parameters for the creation of a managed bot.
+ *
+ * @link https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot
+ *
+ * @method int getRequestId() Signed 32-bit identifier of the request
+ * @method string getSuggestedName() Optional. Suggested name for the bot
+ * @method string getSuggestedUsername() Optional. Suggested username for the bot
+ */
+class KeyboardButtonRequestManagedBot extends Entity
+{
+
+}
diff --git a/src/Entities/Link.php b/src/Entities/Link.php
new file mode 100644
index 0000000..70b2eb5
--- /dev/null
+++ b/src/Entities/Link.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class Link
+ *
+ * @link https://core.telegram.org/bots/api#link
+ *
+ * @method string getUrl() URL of the link
+ */
+class Link extends Entity
+{
+}
diff --git a/src/Entities/LivePhoto.php b/src/Entities/LivePhoto.php
new file mode 100644
index 0000000..969c30d
--- /dev/null
+++ b/src/Entities/LivePhoto.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class LivePhoto
+ *
+ * This object represents a live photo.
+ *
+ * @link https://core.telegram.org/bots/api#livephoto
+ *
+ * @method string getFileId() Identifier for this file, which can be used to download or reuse the file
+ * @method string getFileUniqueId() 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.
+ * @method int getWidth() Live photo width
+ * @method int getHeight() Live photo height
+ * @method int getDuration() Duration of the video in seconds
+ * @method PhotoSize getThumbnail() Optional. Live photo thumbnail
+ * @method int getFileSize() Optional. File size in bytes
+ */
+class LivePhoto extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'thumbnail' => PhotoSize::class,
+ ];
+ }
+}
diff --git a/src/Entities/LocationAddress.php b/src/Entities/LocationAddress.php
new file mode 100644
index 0000000..55e4aaf
--- /dev/null
+++ b/src/Entities/LocationAddress.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class LocationAddress
+ *
+ * Describes the physical address of a location.
+ *
+ * @link https://core.telegram.org/bots/api#locationaddress
+ *
+ * @method string getCountryCode() The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located
+ * @method string getState() Optional. State of the location
+ * @method string getCity() Optional. City of the location
+ * @method string getStreet() Optional. Street address of the location
+ */
+class LocationAddress extends Entity
+{
+}
diff --git a/src/Entities/ManagedBotCreated.php b/src/Entities/ManagedBotCreated.php
new file mode 100644
index 0000000..3860652
--- /dev/null
+++ b/src/Entities/ManagedBotCreated.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ManagedBotCreated
+ *
+ * This object contains information about the bot that was created to be managed by the current bot.
+ *
+ * @link https://core.telegram.org/bots/api#managedbotcreated
+ *
+ * @method User getBot() Information about the bot.
+ */
+class ManagedBotCreated extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'bot' => User::class,
+ ];
+ }
+}
diff --git a/src/Entities/ManagedBotUpdated.php b/src/Entities/ManagedBotUpdated.php
new file mode 100644
index 0000000..80894db
--- /dev/null
+++ b/src/Entities/ManagedBotUpdated.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class ManagedBotUpdated
+ *
+ * This object contains information about the creation, token update, or owner update of a bot that is managed by the current bot.
+ *
+ * @link https://core.telegram.org/bots/api#managedbotupdated
+ *
+ * @method User getUser() User that created the bot
+ * @method User getBot() Information about the bot.
+ */
+class ManagedBotUpdated extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'user' => User::class,
+ 'bot' => User::class,
+ ];
+ }
+}
diff --git a/src/Entities/OwnedGift.php b/src/Entities/OwnedGift.php
new file mode 100644
index 0000000..2407116
--- /dev/null
+++ b/src/Entities/OwnedGift.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class OwnedGift
+ *
+ * This object describes a gift received and owned by a user or a chat.
+ * Currently, it can be one of
+ * - OwnedGiftRegular
+ * - OwnedGiftUnique
+ *
+ * @link https://core.telegram.org/bots/api#ownedgift
+ */
+class OwnedGift extends Entity implements Factory
+{
+ /**
+ * @param array $data
+ * @param string $bot_username
+ *
+ * @return OwnedGiftRegular|OwnedGiftUnique
+ */
+ public static function make(array $data, string $bot_username)
+ {
+ $type = $data['type'] ?? null;
+ if ($type === 'unique') {
+ return new OwnedGiftUnique($data, $bot_username);
+ }
+
+ return new OwnedGiftRegular($data, $bot_username);
+ }
+}
diff --git a/src/Entities/OwnedGiftRegular.php b/src/Entities/OwnedGiftRegular.php
new file mode 100644
index 0000000..ae316f5
--- /dev/null
+++ b/src/Entities/OwnedGiftRegular.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class OwnedGiftRegular
+ *
+ * Describes a regular gift owned by a user or a chat.
+ *
+ * @link https://core.telegram.org/bots/api#ownedgiftregular
+ *
+ * @method string getType() Type of the gift, always “regular”
+ * @method Gift getGift() Information about the regular gift
+ * @method string getOwnedGiftId() Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
+ * @method User getSenderUser() Optional. Sender of the gift if it is a known user
+ * @method int getSendDate() Date the gift was sent in Unix time
+ * @method string getText() Optional. Text of the message that was added to the gift
+ * @method MessageEntity[] getEntities() Optional. Special entities that appear in the text
+ * @method bool getIsPrivate() Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
+ * @method bool getIsSaved() Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
+ * @method bool getCanBeUpgraded() Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only
+ * @method bool getWasRefunded() Optional. True, if the gift was refunded and isn't available anymore
+ * @method int getConvertStarCount() Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only
+ * @method int getPrepaidUpgradeStarCount() Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift
+ * @method bool getIsUpgradeSeparate() Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only
+ * @method int getUniqueGiftNumber() Optional. Unique number reserved for this gift when upgraded
+ */
+class OwnedGiftRegular extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'gift' => Gift::class,
+ 'sender_user' => User::class,
+ 'entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/OwnedGiftUnique.php b/src/Entities/OwnedGiftUnique.php
new file mode 100644
index 0000000..2389225
--- /dev/null
+++ b/src/Entities/OwnedGiftUnique.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class OwnedGiftUnique
+ *
+ * Describes a unique gift received and owned by a user or a chat.
+ *
+ * @link https://core.telegram.org/bots/api#ownedgiftunique
+ *
+ * @method string getType() Type of the gift, always “unique”
+ * @method UniqueGift getGift() Information about the unique gift
+ * @method string getOwnedGiftId() Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only
+ * @method User getSenderUser() Optional. Sender of the gift if it is a known user
+ * @method int getSendDate() Date the gift was sent in Unix time
+ * @method bool getIsSaved() Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
+ * @method bool getCanBeTransferred() Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only
+ * @method int getTransferStarCount() Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
+ * @method int getNextTransferDate() Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now
+ */
+class OwnedGiftUnique extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'gift' => UniqueGift::class,
+ 'sender_user' => User::class,
+ ];
+ }
+}
diff --git a/src/Entities/OwnedGifts.php b/src/Entities/OwnedGifts.php
new file mode 100644
index 0000000..a1e760c
--- /dev/null
+++ b/src/Entities/OwnedGifts.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class OwnedGifts
+ *
+ * Contains the list of gifts received and owned by a user or a chat.
+ *
+ * @link https://core.telegram.org/bots/api#ownedgifts
+ *
+ * @method int getTotalCount() The total number of gifts owned by the user or the chat
+ * @method OwnedGift[] getGifts() The list of gifts
+ * @method string getNextOffset() Optional. Offset for the next request. If empty, then there are no more results
+ */
+class OwnedGifts extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ // OwnedGift can be Regular or Unique. Using Factory logic here might be needed or just returning Entity is not enough.
+ // Since this library uses array of classes for polymorphic types usually in subEntities it doesn't support it directly unless custom logic.
+ // But let's check how Update or Message handles multiple types.
+ // Usually it maps to a specific class. Here we have OwnedGift which is a union type.
+ // We can define a OwnedGift class that factory-creates the right one, or just map 'gifts' to a base class.
+ // For now, let's assume we need an OwnedGift factory or similar.
+ // Or we can rely on the fact that Entity constructor handles arrays.
+ // But we need to know WHICH class to instantiate.
+ // Let's create an OwnedGift factory class.
+ 'gifts' => [OwnedGift::class],
+ ];
+ }
+}
diff --git a/src/Entities/PaidMedia/PaidMedia.php b/src/Entities/PaidMedia/PaidMedia.php
new file mode 100644
index 0000000..0414c79
--- /dev/null
+++ b/src/Entities/PaidMedia/PaidMedia.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\PaidMedia;
+
+use Longman\TelegramBot\Entities\Entity;
+
+/**
+ * Class PaidMedia
+ *
+ * This object describes the paid media.
+ *
+ * @link https://core.telegram.org/bots/api#paidmedia
+ *
+ * @method string getType() Type of the paid media
+ */
+abstract class PaidMedia extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ public static function getFactory($data)
+ {
+ $type = $data['type'] ?? null;
+ switch ($type) {
+ case 'preview':
+ return new PaidMediaPreview($data);
+ case 'photo':
+ return new PaidMediaPhoto($data);
+ case 'video':
+ return new PaidMediaVideo($data);
+ case 'live_photo':
+ return new PaidMediaLivePhoto($data);
+ default:
+ // Return a base PaidMedia object or handle as an error
+ return new class ($data) extends PaidMedia {
+ protected function subEntities(): array
+ {
+ return [];
+ }
+ };
+ }
+ }
+}
diff --git a/src/Entities/PaidMedia/PaidMediaPhoto.php b/src/Entities/PaidMedia/PaidMediaPhoto.php
new file mode 100644
index 0000000..edbc733
--- /dev/null
+++ b/src/Entities/PaidMedia/PaidMediaPhoto.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\PaidMedia;
+
+use Longman\TelegramBot\Entities\PhotoSize;
+
+/**
+ * Class PaidMediaPhoto
+ *
+ * The paid media is a photo.
+ *
+ * @link https://core.telegram.org/bots/api#paidmediaphoto
+ *
+ * @method string getType() Type of the paid media, always “photo”
+ * @method PhotoSize[] getPhoto() The photo
+ *
+ * @method $this setType(string $type) Type of the paid media, always “photo”
+ * @method $this setPhoto(PhotoSize[] $photo) The photo
+ */
+class PaidMediaPhoto extends PaidMedia
+{
+ protected function subEntities(): array
+ {
+ return [
+ 'photo' => [PhotoSize::class],
+ ];
+ }
+}
diff --git a/src/Entities/PaidMedia/PaidMediaPreview.php b/src/Entities/PaidMedia/PaidMediaPreview.php
new file mode 100644
index 0000000..e37d29b
--- /dev/null
+++ b/src/Entities/PaidMedia/PaidMediaPreview.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\PaidMedia;
+
+use Longman\TelegramBot\Entities\PhotoSize;
+
+/**
+ * Class PaidMediaPreview
+ *
+ * The paid media is a preview of a media album.
+ *
+ * @link https://core.telegram.org/bots/api#paidmediapreview
+ *
+ * @method string getType() Type of the paid media, always “preview”
+ * @method int getWidth() Optional. Media width as defined by the sender
+ * @method int getHeight() Optional. Media height as defined by the sender
+ * @method int getDuration() Optional. Duration of the media in seconds as defined by the sender
+ *
+ * @method $this setType(string $type) Type of the paid media, always “preview”
+ * @method $this setWidth(int $width) Optional. Media width as defined by the sender
+ * @method $this setHeight(int $height) Optional. Media height as defined by the sender
+ * @method $this setDuration(int $duration) Optional. Duration of the media in seconds as defined by the sender
+ */
+class PaidMediaPreview extends PaidMedia
+{
+ protected function subEntities(): array
+ {
+ return [];
+ }
+}
diff --git a/src/Entities/PaidMedia/PaidMediaVideo.php b/src/Entities/PaidMedia/PaidMediaVideo.php
new file mode 100644
index 0000000..affa32f
--- /dev/null
+++ b/src/Entities/PaidMedia/PaidMediaVideo.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\PaidMedia;
+
+use Longman\TelegramBot\Entities\PhotoSize;
+use Longman\TelegramBot\Entities\Video;
+
+/**
+ * Class PaidMediaVideo
+ *
+ * The paid media is a video.
+ *
+ * @link https://core.telegram.org/bots/api#paidmediavideo
+ *
+ * @method string getType() Type of the paid media, always “video”
+ * @method Video getVideo() The video
+ *
+ * @method $this setType(string $type) Type of the paid media, always “video”
+ * @method $this setVideo(Video $video) The video
+ */
+class PaidMediaVideo extends PaidMedia
+{
+ protected function subEntities(): array
+ {
+ return [
+ 'video' => Video::class,
+ ];
+ }
+}
diff --git a/src/Entities/PaidMediaInfo.php b/src/Entities/PaidMediaInfo.php
new file mode 100644
index 0000000..1107e4d
--- /dev/null
+++ b/src/Entities/PaidMediaInfo.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+use Longman\TelegramBot\Entities\PaidMedia\PaidMedia;
+
+/**
+ * Class PaidMediaInfo
+ *
+ * Describes the paid media.
+ *
+ * @link https://core.telegram.org/bots/api#paidmediainfo
+ *
+ * @method int getStarCount() The number of Telegram Stars that must be paid to buy access to the media
+ * @method PaidMedia[] getPaidMedia() The paid media
+ *
+ * @method $this setStarCount(int $starCount) The number of Telegram Stars that must be paid to buy access to the media
+ * @method $this setPaidMedia(PaidMedia[] $paidMedia) The paid media
+ */
+class PaidMediaInfo extends Entity
+{
+ protected function subEntities(): array
+ {
+ return [
+ 'paid_media' => [PaidMedia::class],
+ ];
+ }
+}
diff --git a/src/Entities/PaidMediaLivePhoto.php b/src/Entities/PaidMediaLivePhoto.php
new file mode 100644
index 0000000..a1f7af3
--- /dev/null
+++ b/src/Entities/PaidMediaLivePhoto.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PaidMediaLivePhoto
+ *
+ * The paid media is a live photo.
+ *
+ * @link https://core.telegram.org/bots/api#paidmedialivephoto
+ *
+ * @method string getType() Type of the paid media, always “live_photo”
+ * @method LivePhoto getLivePhoto() The live photo
+ */
+class PaidMediaLivePhoto extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'live_photo' => LivePhoto::class,
+ ];
+ }
+}
diff --git a/src/Entities/PaidMediaPurchased.php b/src/Entities/PaidMediaPurchased.php
new file mode 100644
index 0000000..332e88f
--- /dev/null
+++ b/src/Entities/PaidMediaPurchased.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PaidMediaPurchased
+ *
+ * This object contains information about a paid media purchase.
+ *
+ * @link https://core.telegram.org/bots/api#paidmediapurchased
+ *
+ * @method User getFrom() User who purchased the media
+ * @method string getPaidMediaPayload() Bot-specified payload for the paid media
+ */
+class PaidMediaPurchased extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'from' => User::class,
+ ];
+ }
+}
diff --git a/src/Entities/PaidMessagePriceChanged.php b/src/Entities/PaidMessagePriceChanged.php
new file mode 100644
index 0000000..2f60f97
--- /dev/null
+++ b/src/Entities/PaidMessagePriceChanged.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PaidMessagePriceChanged
+ *
+ * Describes a service message about a change in the price of paid messages within a chat.
+ *
+ * @link https://core.telegram.org/bots/api#paidmessagepricechanged
+ *
+ * @method int getPaidMessageStarCount() The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
+ */
+class PaidMessagePriceChanged extends Entity
+{
+}
diff --git a/src/Entities/Poll/InputPollOption.php b/src/Entities/Poll/InputPollOption.php
new file mode 100644
index 0000000..507a987
--- /dev/null
+++ b/src/Entities/Poll/InputPollOption.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities\Poll;
+
+use Longman\TelegramBot\Entities\Entity;
+use Longman\TelegramBot\Entities\MessageEntity;
+
+/**
+ * Class InputPollOption
+ *
+ * This entity contains information about one answer option in a poll to be sent.
+ *
+ * @link https://core.telegram.org/bots/api#inputpolloption
+ *
+ * @method string getText() Option text, 1-100 characters
+ * @method MessageEntity[] getTextEntities() Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode
+ */
+class InputPollOption extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/PollMedia.php b/src/Entities/PollMedia.php
new file mode 100644
index 0000000..47e1b3b
--- /dev/null
+++ b/src/Entities/PollMedia.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PollMedia
+ *
+ * This object represents a media in a poll.
+ *
+ * @link https://core.telegram.org/bots/api#pollmedia
+ *
+ * @method string getType() Type of the media
+ * @method PhotoSize getPhoto() Optional. Photo
+ * @method Video getVideo() Optional. Video
+ * @method Animation getAnimation() Optional. Animation
+ * @method Audio getAudio() Optional. Audio
+ * @method Document getDocument() Optional. Document
+ * @method Sticker getSticker() Optional. Sticker
+ * @method Location getLocation() Optional. Location
+ * @method Venue getVenue() Optional. Venue
+ * @method Link getLink() Optional. Link
+ */
+class PollMedia extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'photo' => PhotoSize::class,
+ 'video' => Video::class,
+ 'animation' => Animation::class,
+ 'audio' => Audio::class,
+ 'document' => Document::class,
+ 'sticker' => Sticker::class,
+ 'location' => Location::class,
+ 'venue' => Venue::class,
+ 'link' => Link::class,
+ ];
+ }
+}
diff --git a/src/Entities/PollOptionAdded.php b/src/Entities/PollOptionAdded.php
new file mode 100644
index 0000000..2c95506
--- /dev/null
+++ b/src/Entities/PollOptionAdded.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PollOptionAdded
+ *
+ * Describes a service message about an option added to a poll.
+ *
+ * @link https://core.telegram.org/bots/api#polloptionadded
+ *
+ * @method Message getPollMessage() Optional. Message containing the poll to which the option was added
+ * @method string getOptionPersistentId() Unique identifier of the added option
+ * @method string getOptionText() Option text
+ * @method MessageEntity[] getOptionTextEntities() Optional. Special entities that appear in the option_text
+ */
+class PollOptionAdded extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'poll_message' => Message::class,
+ 'option_text_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/PollOptionDeleted.php b/src/Entities/PollOptionDeleted.php
new file mode 100644
index 0000000..0e47f50
--- /dev/null
+++ b/src/Entities/PollOptionDeleted.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PollOptionDeleted
+ *
+ * Describes a service message about an option deleted from a poll.
+ *
+ * @link https://core.telegram.org/bots/api#polloptiondeleted
+ *
+ * @method Message getPollMessage() Optional. Message containing the poll from which the option was deleted
+ * @method string getOptionPersistentId() Unique identifier of the deleted option
+ * @method string getOptionText() Option text
+ * @method MessageEntity[] getOptionTextEntities() Optional. Special entities that appear in the option_text
+ */
+class PollOptionDeleted extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'poll_message' => Message::class,
+ 'option_text_entities' => [MessageEntity::class],
+ ];
+ }
+}
diff --git a/src/Entities/PreparedInlineMessage.php b/src/Entities/PreparedInlineMessage.php
new file mode 100644
index 0000000..f64d00c
--- /dev/null
+++ b/src/Entities/PreparedInlineMessage.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PreparedInlineMessage
+ *
+ * This object represents a message that can be sent by a user from a Mini App via the method shareMessage.
+ *
+ * @link https://core.telegram.org/bots/api#preparedinlinemessage
+ *
+ * @method string getId() Unique identifier of the prepared message
+ * @method int getExpirationDate() Expiration date of the prepared message in Unix time
+ */
+class PreparedInlineMessage extends Entity
+{
+}
diff --git a/src/Entities/PreparedKeyboardButton.php b/src/Entities/PreparedKeyboardButton.php
new file mode 100644
index 0000000..e9caf23
--- /dev/null
+++ b/src/Entities/PreparedKeyboardButton.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class PreparedKeyboardButton
+ *
+ * Describes a keyboard button to be used by a user of a Mini App.
+ *
+ * @link https://core.telegram.org/bots/api#preparedkeyboardbutton
+ *
+ * @method string getId() Unique identifier of the keyboard button
+ */
+class PreparedKeyboardButton extends Entity
+{
+
+}
diff --git a/src/Entities/ReactionType/ReactionTypePaid.php b/src/Entities/ReactionType/ReactionTypePaid.php
new file mode 100644
index 0000000..8dd601c
--- /dev/null
+++ b/src/Entities/ReactionType/ReactionTypePaid.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\ReactionType;
+
+use Longman\TelegramBot\Entities\Entity;
+
+/**
+ * Class ReactionTypePaid
+ *
+ * @link https://core.telegram.org/bots/api#reactiontypepaid
+ *
+ * @method string getType() Type of the reaction, always “paid”
+ */
+class ReactionTypePaid extends Entity implements ReactionType
+{
+
+}
diff --git a/src/Entities/RevenueWithdrawalState.php b/src/Entities/RevenueWithdrawalState.php
new file mode 100644
index 0000000..e315d63
--- /dev/null
+++ b/src/Entities/RevenueWithdrawalState.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class RevenueWithdrawalState
+ *
+ * This object describes the state of a revenue withdrawal operation.
+ *
+ * @link https://core.telegram.org/bots/api#revenuewithdrawalstate
+ *
+ * @method string getType() Type of the state, one of “pending”, “succeeded”, “failed”
+ */
+class RevenueWithdrawalState extends Entity
+{
+}
diff --git a/src/Entities/RichBlock/RichBlock.php b/src/Entities/RichBlock/RichBlock.php
new file mode 100644
index 0000000..343fdf5
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlock.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+use Longman\TelegramBot\Entities\Entity;
+use Longman\TelegramBot\Entities\Factory;
+
+/**
+ * Class RichBlock
+ *
+ * This object represents a block in a rich formatted message.
+ * Currently, it can be one of the subclass types.
+ *
+ * @link https://core.telegram.org/bots/api#richblock
+ */
+class RichBlock extends Entity implements Factory
+{
+ /**
+ * @param array $data
+ * @param string $bot_username
+ *
+ * @return RichBlock
+ */
+ public static function make(array $data, string $bot_username): Entity
+ {
+ $type = $data['type'] ?? '';
+
+ $class = __NAMESPACE__ . '\\RichBlock' . str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
+ if (class_exists($class)) {
+ return new $class($data, $bot_username);
+ }
+
+ // Fallback to base entity if the specific class doesn't exist
+ return new self($data, $bot_username);
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockAnchor.php b/src/Entities/RichBlock/RichBlockAnchor.php
new file mode 100644
index 0000000..50631f3
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockAnchor.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockAnchor
+ *
+ * @link https://core.telegram.org/bots/api#richblockanchor
+ */
+class RichBlockAnchor extends RichBlock
+{
+}
diff --git a/src/Entities/RichBlock/RichBlockAnimation.php b/src/Entities/RichBlock/RichBlockAnimation.php
new file mode 100644
index 0000000..dde0e03
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockAnimation.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockAnimation
+ *
+ * @link https://core.telegram.org/bots/api#richblockanimation
+ */
+class RichBlockAnimation extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'animation' => \Longman\TelegramBot\Entities\Animation::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockAudio.php b/src/Entities/RichBlock/RichBlockAudio.php
new file mode 100644
index 0000000..52db57f
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockAudio.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockAudio
+ *
+ * @link https://core.telegram.org/bots/api#richblockaudio
+ */
+class RichBlockAudio extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'audio' => \Longman\TelegramBot\Entities\Audio::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockBlockQuotation.php b/src/Entities/RichBlock/RichBlockBlockQuotation.php
new file mode 100644
index 0000000..ec2028a
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockBlockQuotation.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockBlockQuotation
+ *
+ * @link https://core.telegram.org/bots/api#richblockblockquotation
+ */
+class RichBlockBlockQuotation extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'credit' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockCaption.php b/src/Entities/RichBlock/RichBlockCaption.php
new file mode 100644
index 0000000..fff1e18
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockCaption.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockCaption
+ *
+ * @link https://core.telegram.org/bots/api#richblockcaption
+ */
+class RichBlockCaption extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ 'credit' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockCollage.php b/src/Entities/RichBlock/RichBlockCollage.php
new file mode 100644
index 0000000..c2b617a
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockCollage.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockCollage
+ *
+ * @link https://core.telegram.org/bots/api#richblockcollage
+ */
+class RichBlockCollage extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ 'caption' => RichBlockCaption::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockDetails.php b/src/Entities/RichBlock/RichBlockDetails.php
new file mode 100644
index 0000000..0f3ab9b
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockDetails.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockDetails
+ *
+ * @link https://core.telegram.org/bots/api#richblockdetails
+ */
+class RichBlockDetails extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ 'summary' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockDivider.php b/src/Entities/RichBlock/RichBlockDivider.php
new file mode 100644
index 0000000..83e8544
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockDivider.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockDivider
+ *
+ * @link https://core.telegram.org/bots/api#richblockdivider
+ */
+class RichBlockDivider extends RichBlock
+{
+}
diff --git a/src/Entities/RichBlock/RichBlockFooter.php b/src/Entities/RichBlock/RichBlockFooter.php
new file mode 100644
index 0000000..58c069b
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockFooter.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockFooter
+ *
+ * @link https://core.telegram.org/bots/api#richblockfooter
+ */
+class RichBlockFooter extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockList.php b/src/Entities/RichBlock/RichBlockList.php
new file mode 100644
index 0000000..ed269ca
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockList.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockList
+ *
+ * @link https://core.telegram.org/bots/api#richblocklist
+ */
+class RichBlockList extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockListItem.php b/src/Entities/RichBlock/RichBlockListItem.php
new file mode 100644
index 0000000..c82422f
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockListItem.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockListItem
+ *
+ * @link https://core.telegram.org/bots/api#richblocklistitem
+ */
+class RichBlockListItem extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockMap.php b/src/Entities/RichBlock/RichBlockMap.php
new file mode 100644
index 0000000..24ea203
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockMap.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockMap
+ *
+ * @link https://core.telegram.org/bots/api#richblockmap
+ */
+class RichBlockMap extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'location' => \Longman\TelegramBot\Entities\Location::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockMathematicalExpression.php b/src/Entities/RichBlock/RichBlockMathematicalExpression.php
new file mode 100644
index 0000000..ecf73c0
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockMathematicalExpression.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockMathematicalExpression
+ *
+ * @link https://core.telegram.org/bots/api#richblockmathematicalexpression
+ */
+class RichBlockMathematicalExpression extends RichBlock
+{
+}
diff --git a/src/Entities/RichBlock/RichBlockParagraph.php b/src/Entities/RichBlock/RichBlockParagraph.php
new file mode 100644
index 0000000..3301b01
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockParagraph.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockParagraph
+ *
+ * @link https://core.telegram.org/bots/api#richblockparagraph
+ */
+class RichBlockParagraph extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockPhoto.php b/src/Entities/RichBlock/RichBlockPhoto.php
new file mode 100644
index 0000000..c46270b
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockPhoto.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockPhoto
+ *
+ * @link https://core.telegram.org/bots/api#richblockphoto
+ */
+class RichBlockPhoto extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'photo' => [\Longman\TelegramBot\Entities\PhotoSize::class],
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockPreformatted.php b/src/Entities/RichBlock/RichBlockPreformatted.php
new file mode 100644
index 0000000..cbd6bfe
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockPreformatted.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockPreformatted
+ *
+ * @link https://core.telegram.org/bots/api#richblockpreformatted
+ */
+class RichBlockPreformatted extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockPullQuotation.php b/src/Entities/RichBlock/RichBlockPullQuotation.php
new file mode 100644
index 0000000..0824af7
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockPullQuotation.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockPullQuotation
+ *
+ * @link https://core.telegram.org/bots/api#richblockpullquotation
+ */
+class RichBlockPullQuotation extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ 'credit' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockSectionHeading.php b/src/Entities/RichBlock/RichBlockSectionHeading.php
new file mode 100644
index 0000000..febe713
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockSectionHeading.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockSectionHeading
+ *
+ * @link https://core.telegram.org/bots/api#richblocksectionheading
+ */
+class RichBlockSectionHeading extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockSlideshow.php b/src/Entities/RichBlock/RichBlockSlideshow.php
new file mode 100644
index 0000000..c1bdcd0
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockSlideshow.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockSlideshow
+ *
+ * @link https://core.telegram.org/bots/api#richblockslideshow
+ */
+class RichBlockSlideshow extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ 'caption' => RichBlockCaption::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockTable.php b/src/Entities/RichBlock/RichBlockTable.php
new file mode 100644
index 0000000..ab131f5
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockTable.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockTable
+ *
+ * @link https://core.telegram.org/bots/api#richblocktable
+ */
+class RichBlockTable extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockTableCell.php b/src/Entities/RichBlock/RichBlockTableCell.php
new file mode 100644
index 0000000..c5d78a3
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockTableCell.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockTableCell
+ *
+ * @link https://core.telegram.org/bots/api#richblocktablecell
+ */
+class RichBlockTableCell extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockThinking.php b/src/Entities/RichBlock/RichBlockThinking.php
new file mode 100644
index 0000000..ad3ce75
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockThinking.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockThinking
+ *
+ * @link https://core.telegram.org/bots/api#richblockthinking
+ */
+class RichBlockThinking extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => \Longman\TelegramBot\Entities\RichText\RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockVideo.php b/src/Entities/RichBlock/RichBlockVideo.php
new file mode 100644
index 0000000..a447b2b
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockVideo.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockVideo
+ *
+ * @link https://core.telegram.org/bots/api#richblockvideo
+ */
+class RichBlockVideo extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'video' => \Longman\TelegramBot\Entities\Video::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichBlock/RichBlockVoiceNote.php b/src/Entities/RichBlock/RichBlockVoiceNote.php
new file mode 100644
index 0000000..558cefe
--- /dev/null
+++ b/src/Entities/RichBlock/RichBlockVoiceNote.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichBlock;
+
+/**
+ * Class RichBlockVoiceNote
+ *
+ * @link https://core.telegram.org/bots/api#richblockvoicenote
+ */
+class RichBlockVoiceNote extends RichBlock
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'caption' => RichBlockCaption::class,
+ 'voice_note' => \Longman\TelegramBot\Entities\Voice::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichMessage.php b/src/Entities/RichMessage.php
new file mode 100644
index 0000000..67722e5
--- /dev/null
+++ b/src/Entities/RichMessage.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+use Longman\TelegramBot\Entities\RichBlock\RichBlock;
+
+/**
+ * Class RichMessage
+ *
+ * @link https://core.telegram.org/bots/api#richmessage
+ *
+ * @method RichBlock[] getBlocks() Array of blocks forming the message
+ */
+class RichMessage extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'blocks' => [RichBlock::class],
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichText.php b/src/Entities/RichText/RichText.php
new file mode 100644
index 0000000..db2d956
--- /dev/null
+++ b/src/Entities/RichText/RichText.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+use Longman\TelegramBot\Entities\Entity;
+use Longman\TelegramBot\Entities\Factory;
+
+/**
+ * Class RichText
+ *
+ * This object represents rich formatted text.
+ * Currently, it can be one of the subclass types.
+ *
+ * @link https://core.telegram.org/bots/api#richtext
+ */
+class RichText extends Entity implements Factory
+{
+ /**
+ * @param array $data
+ * @param string $bot_username
+ *
+ * @return RichText
+ */
+ public static function make(array $data, string $bot_username): Entity
+ {
+ $type = $data['type'] ?? '';
+
+ $class = __NAMESPACE__ . '\\RichText' . str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
+ if (class_exists($class)) {
+ return new $class($data, $bot_username);
+ }
+
+ // Fallback to base entity if the specific class doesn't exist
+ return new self($data, $bot_username);
+ }
+}
diff --git a/src/Entities/RichText/RichTextAnchor.php b/src/Entities/RichText/RichTextAnchor.php
new file mode 100644
index 0000000..b162e4f
--- /dev/null
+++ b/src/Entities/RichText/RichTextAnchor.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextAnchor
+ *
+ * @link https://core.telegram.org/bots/api#richtextanchor
+ */
+class RichTextAnchor extends RichText
+{
+}
diff --git a/src/Entities/RichText/RichTextAnchorLink.php b/src/Entities/RichText/RichTextAnchorLink.php
new file mode 100644
index 0000000..3450ca9
--- /dev/null
+++ b/src/Entities/RichText/RichTextAnchorLink.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextAnchorLink
+ *
+ * @link https://core.telegram.org/bots/api#richtextanchorlink
+ */
+class RichTextAnchorLink extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextBankCardNumber.php b/src/Entities/RichText/RichTextBankCardNumber.php
new file mode 100644
index 0000000..135953b
--- /dev/null
+++ b/src/Entities/RichText/RichTextBankCardNumber.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextBankCardNumber
+ *
+ * @link https://core.telegram.org/bots/api#richtextbankcardnumber
+ */
+class RichTextBankCardNumber extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextBold.php b/src/Entities/RichText/RichTextBold.php
new file mode 100644
index 0000000..430abb7
--- /dev/null
+++ b/src/Entities/RichText/RichTextBold.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextBold
+ *
+ * @link https://core.telegram.org/bots/api#richtextbold
+ */
+class RichTextBold extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextBotCommand.php b/src/Entities/RichText/RichTextBotCommand.php
new file mode 100644
index 0000000..cd943cb
--- /dev/null
+++ b/src/Entities/RichText/RichTextBotCommand.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextBotCommand
+ *
+ * @link https://core.telegram.org/bots/api#richtextbotcommand
+ */
+class RichTextBotCommand extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextCashtag.php b/src/Entities/RichText/RichTextCashtag.php
new file mode 100644
index 0000000..63a30c5
--- /dev/null
+++ b/src/Entities/RichText/RichTextCashtag.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextCashtag
+ *
+ * @link https://core.telegram.org/bots/api#richtextcashtag
+ */
+class RichTextCashtag extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextCode.php b/src/Entities/RichText/RichTextCode.php
new file mode 100644
index 0000000..3c46c30
--- /dev/null
+++ b/src/Entities/RichText/RichTextCode.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextCode
+ *
+ * @link https://core.telegram.org/bots/api#richtextcode
+ */
+class RichTextCode extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextCustomEmoji.php b/src/Entities/RichText/RichTextCustomEmoji.php
new file mode 100644
index 0000000..497f2b3
--- /dev/null
+++ b/src/Entities/RichText/RichTextCustomEmoji.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextCustomEmoji
+ *
+ * @link https://core.telegram.org/bots/api#richtextcustomemoji
+ */
+class RichTextCustomEmoji extends RichText
+{
+}
diff --git a/src/Entities/RichText/RichTextDateTime.php b/src/Entities/RichText/RichTextDateTime.php
new file mode 100644
index 0000000..c37594a
--- /dev/null
+++ b/src/Entities/RichText/RichTextDateTime.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextDateTime
+ *
+ * @link https://core.telegram.org/bots/api#richtextdatetime
+ */
+class RichTextDateTime extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextEmailAddress.php b/src/Entities/RichText/RichTextEmailAddress.php
new file mode 100644
index 0000000..0515395
--- /dev/null
+++ b/src/Entities/RichText/RichTextEmailAddress.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextEmailAddress
+ *
+ * @link https://core.telegram.org/bots/api#richtextemailaddress
+ */
+class RichTextEmailAddress extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextHashtag.php b/src/Entities/RichText/RichTextHashtag.php
new file mode 100644
index 0000000..34c2706
--- /dev/null
+++ b/src/Entities/RichText/RichTextHashtag.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextHashtag
+ *
+ * @link https://core.telegram.org/bots/api#richtexthashtag
+ */
+class RichTextHashtag extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextItalic.php b/src/Entities/RichText/RichTextItalic.php
new file mode 100644
index 0000000..df20bc9
--- /dev/null
+++ b/src/Entities/RichText/RichTextItalic.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextItalic
+ *
+ * @link https://core.telegram.org/bots/api#richtextitalic
+ */
+class RichTextItalic extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextMarked.php b/src/Entities/RichText/RichTextMarked.php
new file mode 100644
index 0000000..ca9dc03
--- /dev/null
+++ b/src/Entities/RichText/RichTextMarked.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextMarked
+ *
+ * @link https://core.telegram.org/bots/api#richtextmarked
+ */
+class RichTextMarked extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextMathematicalExpression.php b/src/Entities/RichText/RichTextMathematicalExpression.php
new file mode 100644
index 0000000..5988cf2
--- /dev/null
+++ b/src/Entities/RichText/RichTextMathematicalExpression.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextMathematicalExpression
+ *
+ * @link https://core.telegram.org/bots/api#richtextmathematicalexpression
+ */
+class RichTextMathematicalExpression extends RichText
+{
+}
diff --git a/src/Entities/RichText/RichTextMention.php b/src/Entities/RichText/RichTextMention.php
new file mode 100644
index 0000000..e3cebc5
--- /dev/null
+++ b/src/Entities/RichText/RichTextMention.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextMention
+ *
+ * @link https://core.telegram.org/bots/api#richtextmention
+ */
+class RichTextMention extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextPhoneNumber.php b/src/Entities/RichText/RichTextPhoneNumber.php
new file mode 100644
index 0000000..87146db
--- /dev/null
+++ b/src/Entities/RichText/RichTextPhoneNumber.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextPhoneNumber
+ *
+ * @link https://core.telegram.org/bots/api#richtextphonenumber
+ */
+class RichTextPhoneNumber extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextReference.php b/src/Entities/RichText/RichTextReference.php
new file mode 100644
index 0000000..ca782e2
--- /dev/null
+++ b/src/Entities/RichText/RichTextReference.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextReference
+ *
+ * @link https://core.telegram.org/bots/api#richtextreference
+ */
+class RichTextReference extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextReferenceLink.php b/src/Entities/RichText/RichTextReferenceLink.php
new file mode 100644
index 0000000..34f80fa
--- /dev/null
+++ b/src/Entities/RichText/RichTextReferenceLink.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextReferenceLink
+ *
+ * @link https://core.telegram.org/bots/api#richtextreferencelink
+ */
+class RichTextReferenceLink extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextSpoiler.php b/src/Entities/RichText/RichTextSpoiler.php
new file mode 100644
index 0000000..bd9b617
--- /dev/null
+++ b/src/Entities/RichText/RichTextSpoiler.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextSpoiler
+ *
+ * @link https://core.telegram.org/bots/api#richtextspoiler
+ */
+class RichTextSpoiler extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextStrikethrough.php b/src/Entities/RichText/RichTextStrikethrough.php
new file mode 100644
index 0000000..395c144
--- /dev/null
+++ b/src/Entities/RichText/RichTextStrikethrough.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextStrikethrough
+ *
+ * @link https://core.telegram.org/bots/api#richtextstrikethrough
+ */
+class RichTextStrikethrough extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextSubscript.php b/src/Entities/RichText/RichTextSubscript.php
new file mode 100644
index 0000000..b7b1d35
--- /dev/null
+++ b/src/Entities/RichText/RichTextSubscript.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextSubscript
+ *
+ * @link https://core.telegram.org/bots/api#richtextsubscript
+ */
+class RichTextSubscript extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextSuperscript.php b/src/Entities/RichText/RichTextSuperscript.php
new file mode 100644
index 0000000..98e1805
--- /dev/null
+++ b/src/Entities/RichText/RichTextSuperscript.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextSuperscript
+ *
+ * @link https://core.telegram.org/bots/api#richtextsuperscript
+ */
+class RichTextSuperscript extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextTextMention.php b/src/Entities/RichText/RichTextTextMention.php
new file mode 100644
index 0000000..47f7a30
--- /dev/null
+++ b/src/Entities/RichText/RichTextTextMention.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextTextMention
+ *
+ * @link https://core.telegram.org/bots/api#richtexttextmention
+ */
+class RichTextTextMention extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ 'user' => \Longman\TelegramBot\Entities\User::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextUnderline.php b/src/Entities/RichText/RichTextUnderline.php
new file mode 100644
index 0000000..35cfb26
--- /dev/null
+++ b/src/Entities/RichText/RichTextUnderline.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextUnderline
+ *
+ * @link https://core.telegram.org/bots/api#richtextunderline
+ */
+class RichTextUnderline extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/RichText/RichTextUrl.php b/src/Entities/RichText/RichTextUrl.php
new file mode 100644
index 0000000..717f595
--- /dev/null
+++ b/src/Entities/RichText/RichTextUrl.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Longman\TelegramBot\Entities\RichText;
+
+/**
+ * Class RichTextUrl
+ *
+ * @link https://core.telegram.org/bots/api#richtexturl
+ */
+class RichTextUrl extends RichText
+{
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'text' => RichText::class,
+ ];
+ }
+}
diff --git a/src/Entities/SentGuestMessage.php b/src/Entities/SentGuestMessage.php
new file mode 100644
index 0000000..8fc0fd4
--- /dev/null
+++ b/src/Entities/SentGuestMessage.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SentGuestMessage
+ *
+ * Contains information about a message that was sent in guest mode.
+ *
+ * @link https://core.telegram.org/bots/api#sentguestmessage
+ *
+ * @method int getMessageId() Unique identifier of the message
+ * @method int getDate() Date the message was sent in Unix time
+ * @method string getGuestQueryId() Unique identifier of the guest query to which the message is a reply
+ */
+class SentGuestMessage extends Entity
+{
+
+}
diff --git a/src/Entities/SharedUser.php b/src/Entities/SharedUser.php
new file mode 100644
index 0000000..bc6be1a
--- /dev/null
+++ b/src/Entities/SharedUser.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of the TelegramBot package.
+ *
+ * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SharedUser
+ *
+ * This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
+ *
+ * @link https://core.telegram.org/bots/api#shareduser
+ *
+ * @method int getUserId() Identifier of the shared user. 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 64-bit integers or double-precision float types are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.
+ * @method string getFirstName() Optional. First name of the user, if the name was requested by the bot
+ * @method string getLastName() Optional. Last name of the user, if the name was requested by the bot
+ * @method string getUsername() Optional. Username of the user, if the username was requested by the bot
+ * @method PhotoSize[] getPhoto() Optional. Available sizes of the user photo, if the photo was requested by the bot
+ */
+class SharedUser extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'photo' => [PhotoSize::class],
+ ];
+ }
+}
diff --git a/src/Entities/StarAmount.php b/src/Entities/StarAmount.php
new file mode 100644
index 0000000..b60ac1c
--- /dev/null
+++ b/src/Entities/StarAmount.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StarAmount
+ *
+ * Describes an amount of Telegram Stars.
+ *
+ * @link https://core.telegram.org/bots/api#staramount
+ *
+ * @method int getAmount() Integer amount of Telegram Stars, rounded to 0; can be negative
+ * @method int getNanostarAmount() Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive
+ */
+class StarAmount extends Entity
+{
+}
diff --git a/src/Entities/StarTransaction.php b/src/Entities/StarTransaction.php
new file mode 100644
index 0000000..4cb1012
--- /dev/null
+++ b/src/Entities/StarTransaction.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StarTransaction
+ *
+ * Describes a Telegram Star transaction.
+ *
+ * @link https://core.telegram.org/bots/api#startransaction
+ *
+ * @method string getId() Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions.
+ * @method int getAmount() Number of Telegram Stars transferred by the transaction
+ * @method int getNanostarAmount() Optional. The number of 1/10^9 units of Telegram Stars transferred by the transaction; for affiliate program commissions only.
+ * @method int getDate() Date the transaction was created in Unix time
+ * @method TransactionPartner getSource() Optional. Source of the transaction. Can be a user, a bot, or an app. Null for refund transactions.
+ * @method TransactionPartner getReceiver() Optional. Receiver of the transaction. Can be a user, a bot, or an app. Null for refund transactions.
+ */
+class StarTransaction extends Entity
+{
+ protected function subEntities(): array
+ {
+ return [
+ 'source' => TransactionPartnerFactory::class,
+ 'receiver' => TransactionPartnerFactory::class,
+ ];
+ }
+}
diff --git a/src/Entities/StarTransactions.php b/src/Entities/StarTransactions.php
new file mode 100644
index 0000000..4b3c397
--- /dev/null
+++ b/src/Entities/StarTransactions.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StarTransactions
+ *
+ * Contains a list of Telegram Star transactions.
+ *
+ * @link https://core.telegram.org/bots/api#startransactions
+ *
+ * @method StarTransaction[] getTransactions() The list of transactions
+ *
+ * @method $this setTransactions(StarTransaction[] $transactions) The list of transactions
+ */
+class StarTransactions extends Entity
+{
+ protected function subEntities(): array
+ {
+ return [
+ 'transactions' => [StarTransaction::class],
+ ];
+ }
+}
diff --git a/src/Entities/StoryArea.php b/src/Entities/StoryArea.php
new file mode 100644
index 0000000..1a7d0e7
--- /dev/null
+++ b/src/Entities/StoryArea.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryArea
+ *
+ * Describes a clickable area on a story media.
+ *
+ * @link https://core.telegram.org/bots/api#storyarea
+ *
+ * @method StoryAreaPosition getPosition() Position of the area
+ * @method StoryAreaType getType() Type of the area
+ */
+class StoryArea extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'position' => StoryAreaPosition::class,
+ // 'type' is polymorphic, so we need a factory.
+ 'type' => StoryAreaType::class,
+ ];
+ }
+}
diff --git a/src/Entities/StoryAreaPosition.php b/src/Entities/StoryAreaPosition.php
new file mode 100644
index 0000000..9896234
--- /dev/null
+++ b/src/Entities/StoryAreaPosition.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaPosition
+ *
+ * Describes the position of a clickable area within a story.
+ *
+ * @link https://core.telegram.org/bots/api#storyareaposition
+ *
+ * @method float getXPercentage() The abscissa of the area's center, as a percentage of the media width
+ * @method float getYPercentage() The ordinate of the area's center, as a percentage of the media height
+ * @method float getWidthPercentage() The width of the area's rectangle, as a percentage of the media width
+ * @method float getHeightPercentage() The height of the area's rectangle, as a percentage of the media height
+ * @method float getRotationAngle() The clockwise rotation angle of the rectangle, in degrees; 0-360
+ * @method float getCornerRadiusPercentage() The radius of the rectangle corner rounding, as a percentage of the media width
+ */
+class StoryAreaPosition extends Entity
+{
+}
diff --git a/src/Entities/StoryAreaType.php b/src/Entities/StoryAreaType.php
new file mode 100644
index 0000000..1cfe085
--- /dev/null
+++ b/src/Entities/StoryAreaType.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaType
+ *
+ * Describes the type of a clickable area on a story. Currently, it can be one of
+ * - StoryAreaTypeLocation
+ * - StoryAreaTypeSuggestedReaction
+ * - StoryAreaTypeLink
+ * - StoryAreaTypeWeather
+ * - StoryAreaTypeUniqueGift
+ *
+ * @link https://core.telegram.org/bots/api#storyareatype
+ */
+class StoryAreaType extends Entity implements Factory
+{
+ /**
+ * @param array $data
+ * @param string $bot_username
+ *
+ * @return StoryAreaTypeLocation|StoryAreaTypeSuggestedReaction|StoryAreaTypeLink|StoryAreaTypeWeather|StoryAreaTypeUniqueGift
+ */
+ public static function make(array $data, string $bot_username)
+ {
+ $type = $data['type'] ?? null;
+ switch ($type) {
+ case 'location':
+ return new StoryAreaTypeLocation($data, $bot_username);
+ case 'suggested_reaction':
+ return new StoryAreaTypeSuggestedReaction($data, $bot_username);
+ case 'link':
+ return new StoryAreaTypeLink($data, $bot_username);
+ case 'weather':
+ return new StoryAreaTypeWeather($data, $bot_username);
+ case 'unique_gift':
+ return new StoryAreaTypeUniqueGift($data, $bot_username);
+ }
+
+ return new self($data, $bot_username);
+ }
+}
diff --git a/src/Entities/StoryAreaTypeLink.php b/src/Entities/StoryAreaTypeLink.php
new file mode 100644
index 0000000..c1426ba
--- /dev/null
+++ b/src/Entities/StoryAreaTypeLink.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaTypeLink
+ *
+ * Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.
+ *
+ * @link https://core.telegram.org/bots/api#storyareatypelink
+ *
+ * @method string getType() Type of the area, always “link”
+ * @method string getUrl() HTTP or tg:// URL to be opened when the area is clicked
+ */
+class StoryAreaTypeLink extends StoryAreaType
+{
+}
diff --git a/src/Entities/StoryAreaTypeLocation.php b/src/Entities/StoryAreaTypeLocation.php
new file mode 100644
index 0000000..24947f5
--- /dev/null
+++ b/src/Entities/StoryAreaTypeLocation.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaTypeLocation
+ *
+ * Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.
+ *
+ * @link https://core.telegram.org/bots/api#storyareatypelocation
+ *
+ * @method string getType() Type of the area, always “location”
+ * @method float getLatitude() Location latitude in degrees
+ * @method float getLongitude() Location longitude in degrees
+ * @method LocationAddress getAddress() Optional. Address of the location
+ */
+class StoryAreaTypeLocation extends StoryAreaType
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'address' => LocationAddress::class,
+ ];
+ }
+}
diff --git a/src/Entities/StoryAreaTypeSuggestedReaction.php b/src/Entities/StoryAreaTypeSuggestedReaction.php
new file mode 100644
index 0000000..a9b88f8
--- /dev/null
+++ b/src/Entities/StoryAreaTypeSuggestedReaction.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaTypeSuggestedReaction
+ *
+ * Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.
+ *
+ * @link https://core.telegram.org/bots/api#storyareatypesuggestedreaction
+ *
+ * @method string getType() Type of the area, always “suggested_reaction”
+ * @method ReactionType getReactionType() Type of the reaction
+ * @method bool getIsDark() Optional. Pass True if the reaction area has a dark background
+ * @method bool getIsFlipped() Optional. Pass True if reaction area corner is flipped
+ */
+class StoryAreaTypeSuggestedReaction extends StoryAreaType
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'reaction_type' => ReactionType::class,
+ ];
+ }
+}
diff --git a/src/Entities/StoryAreaTypeUniqueGift.php b/src/Entities/StoryAreaTypeUniqueGift.php
new file mode 100644
index 0000000..d9ffb23
--- /dev/null
+++ b/src/Entities/StoryAreaTypeUniqueGift.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaTypeUniqueGift
+ *
+ * Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.
+ *
+ * @link https://core.telegram.org/bots/api#storyareatypeuniquegift
+ *
+ * @method string getType() Type of the area, always “unique_gift”
+ * @method string getName() Unique name of the gift
+ */
+class StoryAreaTypeUniqueGift extends StoryAreaType
+{
+}
diff --git a/src/Entities/StoryAreaTypeWeather.php b/src/Entities/StoryAreaTypeWeather.php
new file mode 100644
index 0000000..314f1f9
--- /dev/null
+++ b/src/Entities/StoryAreaTypeWeather.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class StoryAreaTypeWeather
+ *
+ * Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.
+ *
+ * @link https://core.telegram.org/bots/api#storyareatypeweather
+ *
+ * @method string getType() Type of the area, always “weather”
+ * @method float getTemperature() Temperature, in degree Celsius
+ * @method string getEmoji() Emoji representing the weather
+ * @method int getBackgroundColor() A color of the area background in the ARGB format
+ */
+class StoryAreaTypeWeather extends StoryAreaType
+{
+}
diff --git a/src/Entities/SuggestedPostApprovalFailed.php b/src/Entities/SuggestedPostApprovalFailed.php
new file mode 100644
index 0000000..d3e8477
--- /dev/null
+++ b/src/Entities/SuggestedPostApprovalFailed.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostApprovalFailed
+ *
+ * This object represents a service message about the failed approval of a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostapprovalfailed
+ */
+class SuggestedPostApprovalFailed extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostApproved.php b/src/Entities/SuggestedPostApproved.php
new file mode 100644
index 0000000..1cc447e
--- /dev/null
+++ b/src/Entities/SuggestedPostApproved.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostApproved
+ *
+ * This object represents a service message about the approval of a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostapproved
+ */
+class SuggestedPostApproved extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostDeclined.php b/src/Entities/SuggestedPostDeclined.php
new file mode 100644
index 0000000..0463d3e
--- /dev/null
+++ b/src/Entities/SuggestedPostDeclined.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostDeclined
+ *
+ * This object represents a service message about the rejection of a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostdeclined
+ */
+class SuggestedPostDeclined extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostInfo.php b/src/Entities/SuggestedPostInfo.php
new file mode 100644
index 0000000..c75793f
--- /dev/null
+++ b/src/Entities/SuggestedPostInfo.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostInfo
+ *
+ * This object describes a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostinfo
+ *
+ * @method SuggestedPostPrice getPrice() Optional. Price of the suggested post
+ * @method SuggestedPostParameters getParameters() Optional. Parameters for the suggested post
+ */
+class SuggestedPostInfo extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'price' => SuggestedPostPrice::class,
+ 'parameters' => SuggestedPostParameters::class,
+ ];
+ }
+}
diff --git a/src/Entities/SuggestedPostPaid.php b/src/Entities/SuggestedPostPaid.php
new file mode 100644
index 0000000..1b9d256
--- /dev/null
+++ b/src/Entities/SuggestedPostPaid.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostPaid
+ *
+ * This object represents a service message about a successful payment for a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostpaid
+ */
+class SuggestedPostPaid extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostParameters.php b/src/Entities/SuggestedPostParameters.php
new file mode 100644
index 0000000..00a3d14
--- /dev/null
+++ b/src/Entities/SuggestedPostParameters.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostParameters
+ *
+ * This object describes parameters for a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostparameters
+ *
+ * @method int getDirectMessagesTopicId() Optional. Unique identifier of the direct messages chat topic where the post is suggested
+ * @method string getAuthorSignature() Optional. For channel direct messages chats only, the signature of the suggested post author
+ * @method bool getIsPaidPost() Optional. For channel direct messages chats only, True if the post is a paid post
+ */
+class SuggestedPostParameters extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostPrice.php b/src/Entities/SuggestedPostPrice.php
new file mode 100644
index 0000000..203e51c
--- /dev/null
+++ b/src/Entities/SuggestedPostPrice.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostPrice
+ *
+ * This object describes the price of a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostprice
+ *
+ * @method int getAmount() The price of the suggested post in Telegram Stars
+ */
+class SuggestedPostPrice extends Entity
+{
+}
diff --git a/src/Entities/SuggestedPostRefunded.php b/src/Entities/SuggestedPostRefunded.php
new file mode 100644
index 0000000..943b934
--- /dev/null
+++ b/src/Entities/SuggestedPostRefunded.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class SuggestedPostRefunded
+ *
+ * This object represents a service message about a payment refund for a suggested post.
+ *
+ * @link https://core.telegram.org/bots/api#suggestedpostrefunded
+ */
+class SuggestedPostRefunded extends Entity
+{
+}
diff --git a/src/Entities/TransactionPartner.php b/src/Entities/TransactionPartner.php
new file mode 100644
index 0000000..89aa20e
--- /dev/null
+++ b/src/Entities/TransactionPartner.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Interface TransactionPartner
+ *
+ * This object describes the source of a transaction, or its recipient for outgoing transactions.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartner
+ */
+interface TransactionPartner
+{
+}
diff --git a/src/Entities/TransactionPartnerAffiliateProgram.php b/src/Entities/TransactionPartnerAffiliateProgram.php
new file mode 100644
index 0000000..52962fd
--- /dev/null
+++ b/src/Entities/TransactionPartnerAffiliateProgram.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerAffiliateProgram
+ *
+ * Describes a transaction with an affiliate program.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartneraffiliateprogram
+ *
+ * @method string getType() Type of the transaction partner, always “affiliate_program”
+ * @method User getSponsorUser() Optional. Information about the bot that sponsored the affiliate program
+ * @method int getCommissionPerMille() The number of Telegram Stars for each 1000 Telegram Stars transferred to the bot/business account
+ */
+class TransactionPartnerAffiliateProgram extends Entity implements TransactionPartner
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'sponsor_user' => User::class,
+ ];
+ }
+}
diff --git a/src/Entities/TransactionPartnerChat.php b/src/Entities/TransactionPartnerChat.php
new file mode 100644
index 0000000..cf32e01
--- /dev/null
+++ b/src/Entities/TransactionPartnerChat.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerChat
+ *
+ * Describes a transaction with a chat.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartnerchat
+ *
+ * @method string getType() Type of the transaction partner, always “chat”
+ * @method Chat getChat() Information about the chat
+ * @method Gift getGift() Optional. The gift sent to the chat by the bot
+ */
+class TransactionPartnerChat extends Entity implements TransactionPartner
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'chat' => Chat::class,
+ 'gift' => Gift::class,
+ ];
+ }
+}
diff --git a/src/Entities/TransactionPartnerFactory.php b/src/Entities/TransactionPartnerFactory.php
new file mode 100644
index 0000000..b5175be
--- /dev/null
+++ b/src/Entities/TransactionPartnerFactory.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+class TransactionPartnerFactory extends Factory
+{
+ public static function make(array $data, string $bot_username): Entity
+ {
+ $type = [
+ 'user' => TransactionPartnerUser::class,
+ 'chat' => TransactionPartnerChat::class,
+ 'telegram_api' => TransactionPartnerTelegramApi::class,
+ 'telegram_ads' => TransactionPartnerTelegramAds::class,
+ 'affiliate_program' => TransactionPartnerAffiliateProgram::class,
+ 'fragment' => TransactionPartnerFragment::class,
+ 'other' => TransactionPartnerOther::class,
+ ];
+
+ if (!isset($type[$data['type'] ?? ''])) {
+ return new class ($data, $bot_username) extends Entity implements TransactionPartner {
+ };
+ }
+
+ $class = $type[$data['type']];
+ return new $class($data, $bot_username);
+ }
+}
diff --git a/src/Entities/TransactionPartnerFragment.php b/src/Entities/TransactionPartnerFragment.php
new file mode 100644
index 0000000..999c278
--- /dev/null
+++ b/src/Entities/TransactionPartnerFragment.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerFragment
+ *
+ * Describes a transaction with Fragment.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartnerfragment
+ *
+ * @method string getType() Type of the transaction partner, always “fragment”
+ * @method RevenueWithdrawalState getWithdrawalState() Optional. State of the transaction if the transaction is a withdrawal of Telegram Stars to Fragment
+ */
+class TransactionPartnerFragment extends Entity implements TransactionPartner
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'withdrawal_state' => RevenueWithdrawalState::class,
+ ];
+ }
+}
diff --git a/src/Entities/TransactionPartnerOther.php b/src/Entities/TransactionPartnerOther.php
new file mode 100644
index 0000000..e7a7856
--- /dev/null
+++ b/src/Entities/TransactionPartnerOther.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerOther
+ *
+ * Describes a transaction with an unknown source or recipient.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartnerother
+ *
+ * @method string getType() Type of the transaction partner, always “other”
+ */
+class TransactionPartnerOther extends Entity implements TransactionPartner
+{
+}
diff --git a/src/Entities/TransactionPartnerTelegramAds.php b/src/Entities/TransactionPartnerTelegramAds.php
new file mode 100644
index 0000000..ee1ee3a
--- /dev/null
+++ b/src/Entities/TransactionPartnerTelegramAds.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerTelegramAds
+ *
+ * Describes a transaction with the Telegram Ads platform.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartnertelegramads
+ *
+ * @method string getType() Type of the transaction partner, always “telegram_ads”
+ */
+class TransactionPartnerTelegramAds extends Entity implements TransactionPartner
+{
+}
diff --git a/src/Entities/TransactionPartnerTelegramApi.php b/src/Entities/TransactionPartnerTelegramApi.php
new file mode 100644
index 0000000..dda0977
--- /dev/null
+++ b/src/Entities/TransactionPartnerTelegramApi.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerTelegramApi
+ *
+ * Describes a transaction with the Telegram API.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartnertelegramapi
+ *
+ * @method string getType() Type of the transaction partner, always “telegram_api”
+ * @method int getRequestCount() The number of requests for which the payment was made
+ */
+class TransactionPartnerTelegramApi extends Entity implements TransactionPartner
+{
+}
diff --git a/src/Entities/TransactionPartnerUser.php b/src/Entities/TransactionPartnerUser.php
new file mode 100644
index 0000000..11b3b84
--- /dev/null
+++ b/src/Entities/TransactionPartnerUser.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class TransactionPartnerUser
+ *
+ * Describes a transaction with a user.
+ *
+ * @link https://core.telegram.org/bots/api#transactionpartneruser
+ *
+ * @method string getType() Type of the transaction partner, always “user”
+ * @method string getTransactionType() Type of the transaction, currently one of “invoice_payment”, “paid_media_payment”, “gift_purchase”, “premium_purchase”, “business_account_transfer”
+ * @method User getUser() Information about the user
+ * @method AffiliateInfo getAffiliate() Optional. Information about the affiliate that received a commission via this transaction. Can be available only for “invoice_payment” and “paid_media_payment” transactions.
+ * @method string getInvoicePayload() Optional. Bot-specified invoice payload. Can be available only for “invoice_payment” transactions.
+ * @method int getSubscriptionPeriod() Optional. The duration of the paid subscription. Can be available only for “invoice_payment” transactions.
+ * @method PaidMedia[] getPaidMedia() Optional. Information about the paid media bought by the user; for “paid_media_payment” transactions only
+ * @method string getPaidMediaPayload() Optional. Bot-specified paid media payload. Can be available only for “paid_media_payment” transactions.
+ * @method Gift getGift() Optional. The gift sent to the user by the bot; for “gift_purchase” transactions only
+ * @method int getPremiumSubscriptionDuration() Optional. Number of months the gifted Telegram Premium subscription will be active for; for “premium_purchase” transactions only
+ * @method Gift getPaidGift() Optional. The gift bought by the user; for “paid_media_payment” transactions only
+ */
+class TransactionPartnerUser extends Entity implements TransactionPartner
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'user' => User::class,
+ 'affiliate' => AffiliateInfo::class,
+ 'paid_media' => [PaidMedia\PaidMedia::class],
+ 'gift' => Gift::class,
+ 'paid_gift' => Gift::class,
+ ];
+ }
+}
diff --git a/src/Entities/UniqueGift.php b/src/Entities/UniqueGift.php
new file mode 100644
index 0000000..95dd634
--- /dev/null
+++ b/src/Entities/UniqueGift.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGift
+ *
+ * This object describes a unique gift that was upgraded from a regular gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegift
+ *
+ * @method string getGiftId() Identifier of the regular gift from which the gift was upgraded
+ * @method string getBaseName() Human-readable name of the regular gift from which this unique gift was upgraded
+ * @method string getName() Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas
+ * @method int getNumber() Unique number of the upgraded gift among gifts upgraded from the same regular gift
+ * @method UniqueGiftModel getModel() Model of the gift
+ * @method UniqueGiftSymbol getSymbol() Symbol of the gift
+ * @method UniqueGiftBackdrop getBackdrop() Backdrop of the gift
+ * @method bool getIsPremium() Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers
+ * @method bool getIsBurned() Optional. True, if the gift was used to craft another gift and isn't available anymore
+ * @method bool getIsFromBlockchain() Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram
+ * @method UniqueGiftColors getColors() 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
+ * @method Chat getPublisherChat() Optional. Information about the chat that published the gift
+ */
+class UniqueGift extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'model' => UniqueGiftModel::class,
+ 'symbol' => UniqueGiftSymbol::class,
+ 'backdrop' => UniqueGiftBackdrop::class,
+ 'colors' => UniqueGiftColors::class,
+ 'publisher_chat' => Chat::class,
+ ];
+ }
+}
diff --git a/src/Entities/UniqueGiftBackdrop.php b/src/Entities/UniqueGiftBackdrop.php
new file mode 100644
index 0000000..87ffbd5
--- /dev/null
+++ b/src/Entities/UniqueGiftBackdrop.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftBackdrop
+ *
+ * This object describes the backdrop of a unique gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftbackdrop
+ *
+ * @method string getName() Name of the backdrop
+ * @method UniqueGiftBackdropColors getColors() Colors of the backdrop
+ * @method int getRarityPerMille() The number of unique gifts that receive this backdrop for every 1000 gifts upgraded
+ */
+class UniqueGiftBackdrop extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'colors' => UniqueGiftBackdropColors::class,
+ ];
+ }
+}
diff --git a/src/Entities/UniqueGiftBackdropColors.php b/src/Entities/UniqueGiftBackdropColors.php
new file mode 100644
index 0000000..de8ef51
--- /dev/null
+++ b/src/Entities/UniqueGiftBackdropColors.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftBackdropColors
+ *
+ * This object describes the colors of the backdrop of a unique gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftbackdropcolors
+ *
+ * @method int getCenterColor() The color in the center of the backdrop in RGB format
+ * @method int getEdgeColor() The color on the edges of the backdrop in RGB format
+ * @method int getSymbolColor() The color to be applied to the symbol in RGB format
+ * @method int getTextColor() The color for the text on the backdrop in RGB format
+ */
+class UniqueGiftBackdropColors extends Entity
+{
+}
diff --git a/src/Entities/UniqueGiftColors.php b/src/Entities/UniqueGiftColors.php
new file mode 100644
index 0000000..ff6bb70
--- /dev/null
+++ b/src/Entities/UniqueGiftColors.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftColors
+ *
+ * This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftcolors
+ *
+ * @method string getModelCustomEmojiId() Custom emoji identifier of the unique gift's model
+ * @method string getSymbolCustomEmojiId() Custom emoji identifier of the unique gift's symbol
+ * @method int getLightThemeMainColor() Main color used in light themes; RGB format
+ * @method int[] getLightThemeOtherColors() List of 1-3 additional colors used in light themes; RGB format
+ * @method int getDarkThemeMainColor() Main color used in dark themes; RGB format
+ * @method int[] getDarkThemeOtherColors() List of 1-3 additional colors used in dark themes; RGB format
+ */
+class UniqueGiftColors extends Entity
+{
+}
diff --git a/src/Entities/UniqueGiftInfo.php b/src/Entities/UniqueGiftInfo.php
new file mode 100644
index 0000000..117b069
--- /dev/null
+++ b/src/Entities/UniqueGiftInfo.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftInfo
+ *
+ * Describes a service message about a unique gift that was sent or received.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftinfo
+ *
+ * @method UniqueGift getGift() Information about the gift
+ * @method string getOrigin() Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers
+ * @method string getLastResaleCurrency() Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins.
+ * @method int getLastResaleAmount() Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins
+ * @method string getOwnedGiftId() Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
+ * @method int getTransferStarCount() Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
+ * @method int getNextTransferDate() Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now
+ */
+class UniqueGiftInfo extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'gift' => UniqueGift::class,
+ ];
+ }
+}
diff --git a/src/Entities/UniqueGiftModel.php b/src/Entities/UniqueGiftModel.php
new file mode 100644
index 0000000..d89f2c4
--- /dev/null
+++ b/src/Entities/UniqueGiftModel.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftModel
+ *
+ * This object describes the model of a unique gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftmodel
+ *
+ * @method string getName() Name of the model
+ * @method Sticker getSticker() The sticker that represents the unique gift
+ * @method int getRarityPerMille() The number of unique gifts that receive this model for every 1000 gifts upgraded
+ * @method string getRarity() Optional. The rarity of the unique gift model
+ */
+class UniqueGiftModel extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'sticker' => Sticker::class,
+ ];
+ }
+}
diff --git a/src/Entities/UniqueGiftSymbol.php b/src/Entities/UniqueGiftSymbol.php
new file mode 100644
index 0000000..2e0f3d9
--- /dev/null
+++ b/src/Entities/UniqueGiftSymbol.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UniqueGiftSymbol
+ *
+ * This object describes the symbol shown on the pattern of a unique gift.
+ *
+ * @link https://core.telegram.org/bots/api#uniquegiftsymbol
+ *
+ * @method string getName() Name of the symbol
+ * @method Sticker getSticker() The sticker that represents the unique gift
+ * @method int getRarityPerMille() The number of unique gifts that receive this model for every 1000 gifts upgraded
+ */
+class UniqueGiftSymbol extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'sticker' => Sticker::class,
+ ];
+ }
+}
diff --git a/src/Entities/UserProfileAudios.php b/src/Entities/UserProfileAudios.php
new file mode 100644
index 0000000..924a1f6
--- /dev/null
+++ b/src/Entities/UserProfileAudios.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UserProfileAudios
+ *
+ * This object represents a list of audios added to the profile of a user.
+ *
+ * @link https://core.telegram.org/bots/api#userprofileaudios
+ *
+ * @method int getTotalCount() Total number of audios in the user's profile
+ * @method Audio[] getAudios() List of audios in the user's profile
+ */
+class UserProfileAudios extends Entity
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function subEntities(): array
+ {
+ return [
+ 'audios' => [Audio::class],
+ ];
+ }
+}
diff --git a/src/Entities/UserRating.php b/src/Entities/UserRating.php
new file mode 100644
index 0000000..322290d
--- /dev/null
+++ b/src/Entities/UserRating.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class UserRating
+ *
+ * This object describes the rating of a user based on their Telegram Star spendings.
+ *
+ * @link https://core.telegram.org/bots/api#userrating
+ *
+ * @method int getLevel() Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.
+ * @method int getRating() Numerical value of the user's rating; the higher the rating, the better
+ * @method int getCurrentLevelRating() The rating value required to get the current level
+ * @method int getNextLevelRating() Optional. The rating value required to get to the next level; omitted if the maximum level was reached
+ */
+class UserRating extends Entity
+{
+}
diff --git a/src/Entities/VideoQuality.php b/src/Entities/VideoQuality.php
new file mode 100644
index 0000000..0342005
--- /dev/null
+++ b/src/Entities/VideoQuality.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class VideoQuality
+ *
+ * This object describes the quality of a video.
+ *
+ * @link https://core.telegram.org/bots/api#videoquality
+ *
+ * @method string getFileId() Identifier for this file, which can be used to download or reuse the file
+ * @method string getFileUniqueId() 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.
+ * @method int getWidth() Video width
+ * @method int getHeight() Video height
+ * @method string getCodec() Codec that was used to encode the video, for example, “h264”, “h265”, or “av01”
+ * @method int getFileSize() Optional. File size in bytes
+ */
+class VideoQuality extends Entity
+{
+}
diff --git a/src/Entities/WebAppUser.php b/src/Entities/WebAppUser.php
new file mode 100644
index 0000000..ab86b9c
--- /dev/null
+++ b/src/Entities/WebAppUser.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Longman\TelegramBot\Entities;
+
+/**
+ * Class WebAppUser
+ *
+ * This object contains information about a Web App user.
+ *
+ * @link https://core.telegram.org/bots/api#webappuser
+ *
+ * @method int getId() Unique identifier for this user or bot. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
+ * @method bool getIsBot() Optional. True, if this user is a bot. Returns “user_is_bot” error if the bot is not allowed to act on behalf of the user.
+ * @method string getFirstName() User's or bot’s first name
+ * @method string getLastName() Optional. User's or bot’s last name
+ * @method string getUsername() Optional. User's or bot’s username
+ * @method string getLanguageCode() Optional. IETF language tag of the user's language
+ * @method bool getIsPremium() Optional. True, if this user is a Telegram Premium user
+ * @method bool getAddedToAttachmentMenu() Optional. True, if this user added the bot to the attachment menu
+ * @method bool allowsWriteToPm() Optional. True, if the user allowed the bot to send messages to them.
+ * @method string getPhotoUrl() Optional. URL of the user’s profile photo. The photo can be in .jpg or .png format and is up to 640x640 in size.
+ */
+class WebAppUser extends Entity
+{
+}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 15, 7:21 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
148595
Default Alt Text
(161 KB)

Event Timeline