You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,11 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
7
7
### Notes
8
8
-[:ledger: View file changes][Unreleased]
9
9
### Added
10
+
- Bot API 6.0 See https://core.telegram.org/bots/api#april-16-2022 (@TiiFuchs)
10
11
### Changed
11
12
### Deprecated
13
+
- Telegram changed voice_chat_scheduled, voice_chat_started, voice_chat_ended and voice_chat_participants_invited to video_chat_scheduled, video_chat_started, video_chat_ended and video_chat_participants_invited.
14
+
To reflect that change we marked the corresponding VoiceChat classes as deprecated and created new classes for the VideoChat events.
[](https://telegram.me/PHP_Telegram_Bot_Support)
* Represents the rights of an administrator in a chat.
7
+
*
8
+
* @method bool getIsAnonymous() True, if the user's presence in the chat is hidden
9
+
* @method bool getCanManageChat() True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
10
+
* @method bool getCanDeleteMessages() True, if the administrator can delete messages of other users
11
+
* @method bool getCanManageVideoChats() True, if the administrator can manage video chats
12
+
* @method bool getCanRestrictMembers() True, if the administrator can restrict, ban or unban chat members
13
+
* @method bool getCanPromoteMembers() True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
14
+
* @method bool getCanChangeInfo() True, if the user is allowed to change the chat title, photo and other settings
15
+
* @method bool getCanInviteUsers() True, if the user is allowed to invite new users to the chat
16
+
* @method bool getCanPostMessages() Optional. True, if the administrator can post in the channel; channels only
17
+
* @method bool getCanEditMessages() Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
18
+
* @method bool getCanPinMessages() Optional. True, if the user is allowed to pin messages; groups and supergroups only
19
+
*
20
+
* @method $this setIsAnonymous(bool $is_anonymous) True, if the user's presence in the chat is hidden
21
+
* @method $this setCanManageChat(bool $can_manage_chat) True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
22
+
* @method $this setCanDeleteMessages(bool $can_delete_messages) True, if the administrator can delete messages of other users
23
+
* @method $this setCanManageVideoChats(bool $can_manage_video_chats) True, if the administrator can manage video chats
24
+
* @method $this setCanRestrictMembers(bool $can_restrict_members) True, if the administrator can restrict, ban or unban chat members
25
+
* @method $this setCanPromoteMembers(bool $can_promote_members) True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
26
+
* @method $this setCanChangeInfo(bool $can_change_info) True, if the user is allowed to change the chat title, photo and other settings
27
+
* @method $this setCanInviteUsers(bool $can_invite_users) True, if the user is allowed to invite new users to the chat
28
+
* @method $this setCanPostMessages(bool $can_post_messages) Optional. True, if the administrator can post in the channel; channels only
29
+
* @method $this setCanEditMessages(bool $can_edit_messages) Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
30
+
* @method $this setCanPinMessages(bool $can_pin_messages) Optional. True, if the user is allowed to pin messages; groups and supergroups only
Copy file name to clipboardExpand all lines: src/Entities/ChatMember/ChatMemberAdministrator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
* @method bool getCanPostMessages() True, if the administrator can post in the channel; channels only
20
20
* @method bool getCanEditMessages() True, if the administrator can edit messages of other users and can pin messages; channels only
21
21
* @method bool getCanDeleteMessages() True, if the administrator can delete messages of other users
22
-
* @method bool getCanManageVoiceChats() True, if the administrator can manage voice chats
22
+
* @method bool getCanManageVideoChats() True, if the administrator can manage video chats
23
23
* @method bool getCanRestrictMembers() True, if the administrator can restrict, ban or unban chat members
24
24
* @method bool getCanPromoteMembers() True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
25
25
* @method bool getCanChangeInfo() True, if the user is allowed to change the chat title, photo and other settings
Copy file name to clipboardExpand all lines: src/Entities/InlineKeyboardButton.php
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,17 @@
23
23
* @method string getUrl() Optional. HTTP url to be opened when button is pressed
24
24
* @method LoginUrl getLoginUrl() Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
25
25
* @method string getCallbackData() Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
26
+
* @method WebAppInfo getWebApp() Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
26
27
* @method string getSwitchInlineQuery() Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
27
28
* @method string getSwitchInlineQueryCurrentChat() Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
28
29
* @method CallbackGame getCallbackGame() Optional. Description of the game that will be launched when the user presses the button.
29
30
* @method bool getPay() Optional. Specify True, to send a Pay button.
30
31
*
31
32
* @method $this setText(string $text) Label text on the button
32
33
* @method $this setUrl(string $url) Optional. HTTP url to be opened when button is pressed
33
-
* @method $this setLoginUrl(LoginUrl $login_url) Optional. HTTP url to be opened when button is pressed
34
+
* @method $this setLoginUrl(LoginUrl $login_url) Optional. HTTP url to be opened when button is pressed
34
35
* @method $this setCallbackData(string $callback_data) Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
36
+
* @method $this setWebApp(WebAppInfo $web_app) Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
35
37
* @method $this setSwitchInlineQuery(string $switch_inline_query) Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
36
38
* @method $this setSwitchInlineQueryCurrentChat(string $switch_inline_query_current_chat) Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
37
39
* @method $this setCallbackGame(CallbackGame $callback_game) Optional. Description of the game that will be launched when the user presses the button.
@@ -52,6 +54,7 @@ public static function couldBe(array $data): bool
@@ -83,7 +86,7 @@ protected function validate(): void
83
86
}
84
87
85
88
if ($num_params !== 1) {
86
-
thrownewTelegramException('You must use only one of these fields: url, login_url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!');
89
+
thrownewTelegramException('You must use only one of these fields: url, login_url, callback_data, web_app, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!');
87
90
}
88
91
}
89
92
@@ -93,8 +96,8 @@ protected function validate(): void
93
96
publicfunction__call($method, $args)
94
97
{
95
98
// Only 1 of these can be set, so clear the others when setting a new one.
0 commit comments