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: src/Entities/InlineKeyboardButton.php
+7-4
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
*
21
21
* @method string getText() Label text on the button
22
22
* @method string getUrl() Optional. HTTP url to be opened when button is pressed
23
+
* @method LoginUrl getLoginUrl() Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
23
24
* @method string getCallbackData() Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
24
25
* @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.
25
26
* @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,6 +29,7 @@
28
29
*
29
30
* @method $this setText(string $text) Label text on the button
30
31
* @method $this setUrl(string $url) Optional. HTTP url to be opened when button is pressed
32
+
* @method $this setLoginUrl(LoginUrl $login_url) Optional. HTTP url to be opened when button is pressed
31
33
* @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
32
34
* @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.
33
35
* @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.
@@ -48,6 +50,7 @@ public static function couldBe($data)
thrownewTelegramException('You must use only one of these fields: url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!');
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!');
84
87
}
85
88
}
86
89
@@ -90,8 +93,8 @@ protected function validate()
90
93
publicfunction__call($method, $args)
91
94
{
92
95
// Only 1 of these can be set, so clear the others when setting a new one.
93
-
if (in_array($method, ['setUrl', 'setCallbackData', 'setSwitchInlineQuery', 'setSwitchInlineQueryCurrentChat', 'setCallbackGame', 'setPay'], true)) {
* @method string getUrl() An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
21
+
* @method string getForwardText() Optional. New text of the button in forwarded messages.
22
+
* @method string getBotUsername() Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
23
+
* @method bool getRequestWriteAccess() Optional. Pass True to request the permission for your bot to send messages to the user.
Copy file name to clipboardExpand all lines: src/Entities/Message.php
+3
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@
65
65
* @method SuccessfulPayment getSuccessfulPayment() Optional. Message is a service message about a successful payment, information about the payment.
66
66
* @method string getConnectedWebsite() Optional. The domain name of the website on which the user has logged in.
67
67
* @method PassportData getPassportData() Optional. Telegram Passport data
68
+
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
68
69
*/
69
70
class Message extends Entity
70
71
{
@@ -101,6 +102,7 @@ protected function subEntities()
* @expectedExceptionMessage You must use only one of these fields: url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!
36
+
* @expectedExceptionMessage You must use only one of these fields: url, login_url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!
* @expectedExceptionMessage You must use only one of these fields: url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!
45
+
* @expectedExceptionMessage You must use only one of these fields: url, login_url, callback_data, switch_inline_query, switch_inline_query_current_chat, callback_game, pay!
0 commit comments