Creates an instance of InlineKeyboard.
Optional
inlineKeyboard: InlineKeyboardButton[][]A 2D array of inline keyboard buttons.
Adds buttons to the last row of the inline keyboard.
Rest
...buttons: InlineKeyboardButton[]The buttons to add.
The current instance for chaining.
Creates a deep copy of the current InlineKeyboard instance.
A new instance of InlineKeyboard with the same buttons.
Checks if this inline keyboard is equal to another inline keyboard.
The other inline keyboard to compare with.
True if both keyboards are equal based on their structure and button properties, otherwise false.
Adds a login button to the inline keyboard.
The button text.
The login URL or LoginUrl object.
The current instance for chaining.
Adds a new row of buttons to the inline keyboard.
Rest
...buttons: InlineKeyboardButton[]The buttons to add.
The current instance for chaining.
Adds a switch inline chosen chat button to the inline keyboard.
The button text.
Optional
query: SwitchInlineQueryChosenChatThe inline query to switch to in the chosen chat.
The current instance for chaining.
Static
fromCreates an InlineKeyboard instance from another instance or a 2D array of buttons.
The source InlineKeyboard instance or 2D array of buttons.
A new instance of InlineKeyboard.
Static
gameCreates a game button.
The button text.
The created game button.
Static
loginCreates a login button.
The button text.
The login URL or LoginUrl object.
The created login button.
Static
payStatic
switchCreates a switch inline button.
The button text.
Optional
query: stringThe inline query to switch to.
The created switch inline button.
Static
switchCreates a switch inline chosen chat button.
The button text.
Optional
query: SwitchInlineQueryChosenChatThe inline query to switch to in the chosen chat.
The created switch inline chosen chat button.
Static
switchCreates a switch inline current chat button.
The button text.
Optional
query: stringThe inline query to switch to in the current chat.
The created switch inline current chat button.
Static
textCreates a callback button.
The button text.
Optional
data: stringThe callback data.
The created callback button.
Static
urlStatic
webCreates a WebApp button.
The button text.
The URL to the WebApp.
The created WebApp button.
Represents an inline keyboard for Telegram bots.