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
* This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
* @method string getText() Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
31
-
* @method KeyboardButtonRequestUser getRequestUser() Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.
32
-
* @method KeyboardButtonRequestChat getRequestChat() Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
33
-
* @method bool getRequestContact() Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
34
-
* @method bool getRequestLocation() Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
35
-
* @method KeyboardButtonPollType getRequestPoll() Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
36
-
* @method WebAppInfo getWebApp() Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
28
+
* @method string getText() Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
29
+
* @method KeyboardButtonRequestUsers getRequestUsers() Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
30
+
* @method KeyboardButtonRequestChat getRequestChat() Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
31
+
* @method bool getRequestContact() Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
32
+
* @method bool getRequestLocation() Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
33
+
* @method KeyboardButtonPollType getRequestPoll() Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
34
+
* @method WebAppInfo getWebApp() Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
37
35
*
38
-
* @method $this setText(string $text) Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
39
-
* @method $this setRequestUser(KeyboardButtonRequestUser $request_user) Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.
40
-
* @method $this setRequestChat(KeyboardButtonRequestChat $request_chat) Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
41
-
* @method $this setRequestContact(bool $request_contact) Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
42
-
* @method $this setRequestLocation(bool $request_location) Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
43
-
* @method $this setRequestPoll(KeyboardButtonPollType $request_poll) Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
44
-
* @method $this setWebApp(WebAppInfo $web_app) Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
36
+
* @method $this setText(string $text) Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
37
+
* @method $this setRequestUsers(KeyboardButtonRequestUsers $request_users) Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
38
+
* @method $this setRequestChat(KeyboardButtonRequestChat $request_chat) Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
39
+
* @method $this setRequestContact(bool $request_contact) Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
40
+
* @method $this setRequestLocation(bool $request_location) Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
41
+
* @method $this setRequestPoll(KeyboardButtonPollType $request_poll) Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
42
+
* @method $this setWebApp(WebAppInfo $web_app) Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
45
43
*/
46
44
class KeyboardButton extends Entity
47
45
{
@@ -59,10 +57,10 @@ public function __construct($data)
Copy file name to clipboardExpand all lines: src/Entities/KeyboardButtonRequestUsers.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,21 @@
3
3
namespaceLongman\TelegramBot\Entities;
4
4
5
5
/**
6
-
* Class KeyboardButtonRequestUser
6
+
* This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed.
7
7
*
8
-
* This entity defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.
* @method int getRequestId() Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
13
11
* @method bool getUserIsBot() Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
14
12
* @method bool getUserIsPremium() Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
13
+
* @method int getMaxQuantity() Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
15
14
*
16
15
* @method $this setRequestId(int $request_id) Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
17
16
* @method $this setUserIsBot(bool $user_is_bot) Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
18
17
* @method $this setUserIsPremium(bool $user_is_premium) Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
18
+
* @method int setMaxQuantity(int $set_max_quantity) Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
Copy file name to clipboardExpand all lines: src/Entities/Message.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@
85
85
* @method Message getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
86
86
* @method Invoice getInvoice() Optional. Message is an invoice for a payment, information about the invoice.
87
87
* @method SuccessfulPayment getSuccessfulPayment() Optional. Message is a service message about a successful payment, information about the payment.
88
-
* @method UserShared getUserShared() Optional. Service message: a user was shared with the bot
88
+
* @method UsersSharedgetUsersShared() Optional. Service message: users were shared with the bot
89
89
* @method ChatShared getChatShared() Optional. Service message: a chat was shared with the bot
90
90
* @method string getConnectedWebsite() Optional. The domain name of the website on which the user has logged in.
91
91
* @method WriteAccessAllowed getWriteAccessAllowed() Optional. Service message: the user allowed the bot added to the attachment menu to write messages
@@ -146,7 +146,7 @@ protected function subEntities(): array
Copy file name to clipboardExpand all lines: utils/db-schema-update/0.82.0-unreleased.sql
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `message_reaction_count` (
33
33
34
34
ALTERTABLE`message`
35
35
ADD COLUMN `external_reply`TEXTNULL DEFAULT NULL COMMENT 'Optional. Information about the message that is being replied to, which may come from another chat or forum topic' AFTER `reply_to_message`,
36
-
ADD COLUMN `link_preview_options`TEXTNULL DEFAULT NULL COMMENT 'Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed' AFTER `via_bot`;
36
+
ADD COLUMN `link_preview_options`TEXTNULL DEFAULT NULL COMMENT 'Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed' AFTER `via_bot`,
37
+
RENAME COLUMN `user_shared` TO `users_shared`;
37
38
38
39
ALTERTABLE`telegram_update`
39
40
ADD COLUMN `message_reaction_id`bigint UNSIGNED DEFAULT NULL COMMENT 'A reaction to a message was changed by a user' AFTER `edited_channel_post_id`,
0 commit comments