Skip to content

Commit 98d7e86

Browse files
authored
Merge pull request #1350 from OxMohsen/develop
Bot API 6.2
2 parents 6a61014 + e878e3e commit 98d7e86

File tree

5 files changed

+35
-29
lines changed

5 files changed

+35
-29
lines changed

src/Entities/Chat.php

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,29 @@
1818
*
1919
* @property string type Type of chat, can be either "private ", "group", "supergroup" or "channel"
2020
*
21-
* @method int getId() Unique identifier for this chat. 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.
22-
* @method string getType() Type of chat, can be either "private ", "group", "supergroup" or "channel"
23-
* @method string getTitle() Optional. Title, for channels and group chats
24-
* @method string getUsername() Optional. Username, for private chats, supergroups and channels if available
25-
* @method string getFirstName() Optional. First name of the other party in a private chat
26-
* @method string getLastName() Optional. Last name of the other party in a private chat
27-
* @method ChatPhoto getPhoto() Optional. Chat photo. Returned only in getChat.
28-
* @method string getBio() Optional. Bio of the other party in a private chat. Returned only in getChat.
29-
* @method bool getHasPrivateForwards() Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
30-
* @method bool getJoinToSendMessages() Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
31-
* @method bool getJoinByRequest() Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
32-
* @method string getDescription() Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
33-
* @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.
34-
* @method Message getPinnedMessage() Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
35-
* @method ChatPermissions getPermissions() Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
36-
* @method int getSlowModeDelay() Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
37-
* @method int getMessageAutoDeleteTime() Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
38-
* @method bool getHasProtectedContent() Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
39-
* @method string getStickerSetName() Optional. For supergroups, name of group sticker set. Returned only in getChat.
40-
* @method bool getCanSetStickerSet() Optional. True, if the bot can change the group sticker set. Returned only in getChat.
41-
* @method int getLinkedChatId() Optional. Unique identifier for the linked chat. Returned only in getChat.
42-
* @method ChatLocation getLocation() Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
21+
* @method int getId() Unique identifier for this chat. 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.
22+
* @method string getType() Type of chat, can be either "private ", "group", "supergroup" or "channel"
23+
* @method string getTitle() Optional. Title, for channels and group chats
24+
* @method string getUsername() Optional. Username, for private chats, supergroups and channels if available
25+
* @method string getFirstName() Optional. First name of the other party in a private chat
26+
* @method string getLastName() Optional. Last name of the other party in a private chat
27+
* @method ChatPhoto getPhoto() Optional. Chat photo. Returned only in getChat.
28+
* @method string getBio() Optional. Bio of the other party in a private chat. Returned only in getChat.
29+
* @method bool getHasPrivateForwards() Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
30+
* @method bool getHasRestrictedVoiceAndVideoMessages() Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
31+
* @method bool getJoinToSendMessages() Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
32+
* @method bool getJoinByRequest() Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
33+
* @method string getDescription() Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
34+
* @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.
35+
* @method Message getPinnedMessage() Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
36+
* @method ChatPermissions getPermissions() Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
37+
* @method int getSlowModeDelay() Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
38+
* @method int getMessageAutoDeleteTime() Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
39+
* @method bool getHasProtectedContent() Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
40+
* @method string getStickerSetName() Optional. For supergroups, name of group sticker set. Returned only in getChat.
41+
* @method bool getCanSetStickerSet() Optional. True, if the bot can change the group sticker set. Returned only in getChat.
42+
* @method int getLinkedChatId() Optional. Unique identifier for the linked chat. Returned only in getChat.
43+
* @method ChatLocation getLocation() Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
4344
*/
4445
class Chat extends Entity
4546
{

src/Entities/MessageEntity.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
*
1717
* @link https://core.telegram.org/bots/api#messageentity
1818
*
19-
* @method string getType() Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” ([email protected]), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames)
20-
* @method int getOffset() Offset in UTF-16 code units to the start of the entity
21-
* @method int getLength() Length of the entity in UTF-16 code units
22-
* @method string getUrl() Optional. For "text_link" only, url that will be opened after user taps on the text
23-
* @method User getUser() Optional. For "text_mention" only, the mentioned user
24-
* @method string getLanguage() Optional. For "pre" only, the programming language of the entity text
19+
* @method string getType() Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” ([email protected]), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
20+
* @method int getOffset() Offset in UTF-16 code units to the start of the entity
21+
* @method int getLength() Length of the entity in UTF-16 code units
22+
* @method string getUrl() Optional. For "text_link" only, url that will be opened after user taps on the text
23+
* @method User getUser() Optional. For "text_mention" only, the mentioned user
24+
* @method string getLanguage() Optional. For "pre" only, the programming language of the entity text
25+
* @method string getCustomEmojiId() Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
2526
*/
2627
class MessageEntity extends Entity
2728
{

src/Entities/Sticker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*
1919
* @method string getFileId() Identifier for this file, which can be used to download or reuse the file
2020
* @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.
21+
* @method string getType() Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.
2122
* @method int getWidth() Sticker width
2223
* @method int getHeight() Sticker height
2324
* @method bool getIsAnimated() True, if the sticker is animated
@@ -27,6 +28,7 @@
2728
* @method string getSetName() Optional. Name of the sticker set to which the sticker belongs
2829
* @method File getPremiumAnimation() Optional. Premium animation for the sticker, if the sticker is premium
2930
* @method MaskPosition getMaskPosition() Optional. For mask stickers, the position where the mask should be placed
31+
* @method string getCustomEmojiId() Optional. For custom emoji stickers, unique identifier of the custom emoji
3032
* @method int getFileSize() Optional. File size
3133
*/
3234
class Sticker extends Entity

src/Entities/StickerSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*
1919
* @method string getName() Sticker set name
2020
* @method string getTitle() Sticker set title
21+
* @method string getStickerType() Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”
2122
* @method bool getIsAnimated() True, if the sticker set contains animated stickers
2223
* @method bool getIsVideo() True, if the sticker set contains video stickers
23-
* @method bool getContainsMasks() True, if the sticker set contains masks
2424
* @method Sticker[] getStickers() List of all set stickers
2525
* @method PhotoSize getThumb() Optional. Sticker set thumbnail in the .WEBP or .TGS format
2626
*/

src/Request.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
* @method static ServerResponse stopPoll(array $data) Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
9999
* @method static ServerResponse deleteMessage(array $data) Use this method to delete a message, including service messages, with certain limitations. Returns True on success.
100100
* @method static ServerResponse getStickerSet(array $data) Use this method to get a sticker set. On success, a StickerSet object is returned.
101+
* @method static ServerResponse getCustomEmojiStickers(array $data) Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
101102
* @method static ServerResponse uploadStickerFile(array $data) Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
102103
* @method static ServerResponse createNewStickerSet(array $data) Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns True on success.
103104
* @method static ServerResponse addStickerToSet(array $data) Use this method to add a new sticker to a set created by the bot. Returns True on success.
@@ -248,6 +249,7 @@ class Request
248249
'stopPoll',
249250
'deleteMessage',
250251
'getStickerSet',
252+
'getCustomEmojiStickers',
251253
'uploadStickerFile',
252254
'createNewStickerSet',
253255
'addStickerToSet',

0 commit comments

Comments
 (0)