diff --git a/src/Entities/Chat.php b/src/Entities/Chat.php index 8ce93771..8535c5ca 100644 --- a/src/Entities/Chat.php +++ b/src/Entities/Chat.php @@ -27,6 +27,8 @@ * @method ChatPhoto getPhoto() Optional. Chat photo. Returned only in getChat. * @method string getBio() Optional. Bio of the other party in a private chat. Returned only in getChat. * @method bool getHasPrivateForwards() Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat. + * @method bool getJoinToSendMessages() Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat. + * @method bool getJoinByRequest() Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat. * @method string getDescription() Optional. Description, for groups, supergroups and channel chats. Returned only in getChat. * @method string getInviteLink() Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat. * @method Message getPinnedMessage() Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat. diff --git a/src/Entities/Sticker.php b/src/Entities/Sticker.php index 8801ca26..4b13fe3d 100644 --- a/src/Entities/Sticker.php +++ b/src/Entities/Sticker.php @@ -16,17 +16,18 @@ * * @link https://core.telegram.org/bots/api#sticker * - * @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() Sticker width - * @method int getHeight() Sticker height - * @method bool getIsAnimated() True, if the sticker is animated - * @method bool getIsVideo() True, if the sticker is a video sticker - * @method PhotoSize getThumb() Optional. Sticker thumbnail in .webp or .jpg format - * @method string getEmoji() Optional. Emoji associated with the sticker - * @method string getSetName() Optional. Name of the sticker set to which the sticker belongs - * @method MaskPosition getMaskPosition() Optional. For mask stickers, the position where the mask should be placed - * @method int getFileSize() Optional. File size + * @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() Sticker width + * @method int getHeight() Sticker height + * @method bool getIsAnimated() True, if the sticker is animated + * @method bool getIsVideo() True, if the sticker is a video sticker + * @method PhotoSize getThumb() Optional. Sticker thumbnail in .webp or .jpg format + * @method string getEmoji() Optional. Emoji associated with the sticker + * @method string getSetName() Optional. Name of the sticker set to which the sticker belongs + * @method File getPremiumAnimation() Optional. Premium animation for the sticker, if the sticker is premium + * @method MaskPosition getMaskPosition() Optional. For mask stickers, the position where the mask should be placed + * @method int getFileSize() Optional. File size */ class Sticker extends Entity { @@ -36,8 +37,9 @@ class Sticker extends Entity protected function subEntities(): array { return [ - 'thumb' => PhotoSize::class, - 'mask_position' => MaskPosition::class, + 'thumb' => PhotoSize::class, + 'premium_animation' => File::class, + 'mask_position' => MaskPosition::class, ]; } } diff --git a/src/Entities/User.php b/src/Entities/User.php index 32f0dbfb..bc412b01 100644 --- a/src/Entities/User.php +++ b/src/Entities/User.php @@ -22,6 +22,8 @@ * @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 getCanJoinGroups() Optional. True, if the bot can be invited to groups. Returned only in getMe. * @method bool getCanReadAllGroupMessages() Optional. True, if privacy mode is disabled for the bot. Returned only in getMe. * @method bool getSupportsInlineQueries() Optional. True, if the bot supports inline queries. Returned only in getMe. diff --git a/src/Request.php b/src/Request.php index 4ea831c5..a4345010 100644 --- a/src/Request.php +++ b/src/Request.php @@ -106,6 +106,7 @@ * @method static ServerResponse setStickerSetThumb(array $data) Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success. * @method static ServerResponse answerWebAppQuery(array $data) Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. * @method static ServerResponse sendInvoice(array $data) Use this method to send invoices. On success, the sent Message is returned. + * @method static ServerResponse createInvoiceLink(array $data) Use this method to create a link for an invoice. Returns the created invoice link as String on success. * @method static ServerResponse answerShippingQuery(array $data) If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. * @method static ServerResponse answerPreCheckoutQuery(array $data) Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. * @method static ServerResponse setPassportDataErrors(array $data) Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success. Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. @@ -255,6 +256,7 @@ class Request 'setStickerSetThumb', 'answerWebAppQuery', 'sendInvoice', + 'createInvoiceLink', 'answerShippingQuery', 'answerPreCheckoutQuery', 'setPassportDataErrors', diff --git a/src/Telegram.php b/src/Telegram.php index bf006c5f..91ca4ef9 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -1063,6 +1063,7 @@ public function setWebhook(string $url, array $data = []): ServerResponse 'max_connections', 'allowed_updates', 'drop_pending_updates', + 'secret_token', ])); $data['url'] = $url;