KeyboardButton#

class pyrogram.raw.base.KeyboardButton#

Bot or inline keyboard buttons

Constructors:

This base type has 18 constructors available.

InputKeyboardButtonRequestPeer

Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer.

InputKeyboardButtonUrlAuth

Button to request a user to authorize via URL using Seamless Telegram Login.

InputKeyboardButtonUserProfile

Button that links directly to a user profile Use this constructor to send a keyboardButtonUserProfile button in an inline keyboard.

KeyboardButton

Bot keyboard button Available only in reply keyboards.

KeyboardButtonBuy

Button to buy a product Available only in inline keyboards.

KeyboardButtonCallback

Callback button Available only in inline keyboards.

KeyboardButtonCopy

Clipboard button Available only in inline keyboards.

KeyboardButtonGame

Button to start a game Available only in inline keyboards.

KeyboardButtonRequestGeoLocation

Button to request a user's geolocation Available only in private chats, in reply keyboards.

KeyboardButtonRequestPeer

Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer Available only in private chats, in reply keyboards.

KeyboardButtonRequestPhone

Button to request a user's phone number Available only in private chats, in reply keyboards.

KeyboardButtonRequestPoll

Button to request a poll from the user Available only in private chats, in reply keyboards.

KeyboardButtonSimpleWebView

Button to open a bot mini app using messages.requestSimpleWebView, without sending user information to the web app.

KeyboardButtonSwitchInline

Button to switch the user to inline mode Available only in inline keyboards.

KeyboardButtonUrl

URL button Available only in inline keyboards.

KeyboardButtonUrlAuth

Button to request a user to authorize via URL using Seamless Telegram Login.

KeyboardButtonUserProfile

Button that links directly to a user profile Available only in inline keyboards.

KeyboardButtonWebView

Button to open a bot mini app using messages.requestWebView, sending over user information after user confirmation.

Functions:

This object can be returned by 1 function.

bots.GetRequestedWebViewButton

Fetch the peer request button a bot prepared for a Mini App with bots.requestWebViewButton, invoked when the Mini App emits a web_app_request_chat event, see here for more info.