Classes
Methods
(inner) buildKeyboard(buttons, optionsopt) → {Array.<Array.<InlineKeyboardButton>>|Array.<Array.<KeyboardButton>>}
Keyboard build method used by Markup.inlineKeyboard
/ Markup.keyboard
Name | Type | Attributes | Description |
---|---|---|---|
buttons | Array.<InlineKeyboardButton> | | ||
options | KeyboardOptions | | <optional> |
- Type:
- Array.<Array.<InlineKeyboardButton>> |
Array.<Array.<KeyboardButton>>
Type Definitions
BotRequestButton
- object
Name | Type | Description |
---|---|---|
text | string | Text of the button. |
request_user | BotRequestButtonParams | Button params object |
BotRequestButtonParams
- object
Name | Type | Attributes | Description |
---|---|---|---|
request_id | number | Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message | |
user_is_bot | boolean | <optional> | Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied. |
ChannelRequestButton
- object
Name | Type | Description |
---|---|---|
text | string | Text of the button. |
request_chat | GroupRequestButtonParams | Button params object |
ChannelRequestButtonExtra
- object
Name | Type | Attributes | Description |
---|---|---|---|
chat_has_username | boolean | <optional> | Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied. |
chat_is_created | boolean | <optional> | Optional. Pass True to request a channel owned by the user. Otherwise, no additional restrictions are applied. |
user_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied. |
bot_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of |
bot_is_member | boolean | <optional> | Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. |
ChannelRequestButtonParams
- object
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
request_id | number | Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message | ||
chat_is_channel | boolean | <optional> | true | Select channel |
chat_has_username | boolean | <optional> | Optional. True for request a supergroup or a channel with a username, False for request a chat without a username. | |
chat_is_created | boolean | <optional> | Optional. True for request a channel owned by the user. | |
user_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. | |
bot_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of | |
bot_is_member | boolean | <optional> | Optional. Pass True to request a chat with the bot as a member. |
EscapeFunction(text) → {string}
Name | Type | Description |
---|---|---|
text | string |
- Type:
- string
GroupRequestButton
- object
Name | Type | Description |
---|---|---|
text | string | Text of the button. |
request_chat | GroupRequestButtonParams | Button params object |
GroupRequestButtonExtra
- object
Name | Type | Attributes | Description |
---|---|---|---|
chat_is_forum | boolean | <optional> | Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied. |
chat_has_username | boolean | <optional> | Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied. |
chat_is_created | boolean | <optional> | Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied. |
user_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied. |
bot_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of |
bot_is_member | boolean | <optional> | Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. |
GroupRequestButtonParams
- object
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
request_id | number | Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message | ||
chat_is_channel | boolean | <optional> | false | Select group |
chat_is_forum | boolean | <optional> | Optional. True to request a forum supergroup, False to request an offline chat. | |
chat_has_username | boolean | <optional> | Optional. True for request a supergroup or a channel with a username, False for request a chat without a username. | |
chat_is_created | boolean | <optional> | Optional. True for request a chat owned by the user. | |
user_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. | |
bot_administrator_rights | ChatAdministratorRights | <optional> | Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of | |
bot_is_member | boolean | <optional> | Optional. Pass True to request a chat with the bot as a member. |
SwitchInlineQueryChosenChatAllowList
This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
- object
Name | Type | Attributes | Description |
---|---|---|---|
allow_user_chats | boolean | <optional> | Optional. True, if private chats with users can be chosen |
allow_bot_chats | boolean | <optional> | Optional. True, if private chats with bots can be chosen |
allow_group_chats | boolean | <optional> | Optional. True, if group and supergroup chats can be chosen |
allow_channel_chats | boolean | <optional> | Optional. True, if channel chats can be chosen |
TagEscapeFunction(template, …substitutions) → {string}
Name | Type | Attributes | Description |
---|---|---|---|
template | TemplateStringsArray | ||
substitutions | string | <repeatable> |
- Type:
- string
UserRequestButton
- object
Name | Type | Description |
---|---|---|
text | string | Text of the button. |
request_user | UserRequestButtonParams | Button params object |
UserRequestButtonParams
- object
Name | Type | Attributes | Description |
---|---|---|---|
request_id | number | Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message | |
user_is_premium | boolean | <optional> | Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied. |