Creates an instance of Keyboard.
Optionalkeyboard: KeyboardButton[][]A 2D array of keyboard buttons.
Optionalinput_The placeholder text for the input field.
Optionalis_Indicates whether the keyboard is persistent.
ReadonlykeyboardOptionalone_Indicates whether the keyboard is a one-time keyboard.
Optionalresize_Indicates whether the keyboard should be resized.
OptionalselectiveIndicates whether the keyboard is selective.
Adds buttons to the last row of the keyboard.
The buttons to add.
The current instance for chaining.
Creates a deep copy of the current Keyboard instance.
Optionalkeyboard: KeyboardButton[][]A new instance of Keyboard with the same buttons and properties.
Combines the current keyboard with another one.
The other Keyboard instance to combine with.
The current instance for chaining.
Checks if this keyboard is equal to another keyboard.
The other keyboard to compare with.
True if both keyboards are equal based on their structure and properties, otherwise false.
Sets the keyboard as a one-time keyboard or not.
OptionalisEnabled: booleanIndicates whether the keyboard should be a one-time keyboard.
The current instance for chaining.
Sets the keyboard as persistent or not.
OptionalisEnabled: booleanIndicates whether the keyboard should be persistent.
The current instance for chaining.
Sets the placeholder text for the input field.
The placeholder text.
The current instance for chaining.
Adds a request chat button to the keyboard.
The button text.
The request ID.
Optionaloptions: Omit<KeyboardButtonRequestChat, "requestId">Additional options for the button.
The current instance for chaining.
Adds a request contact button to the keyboard.
The button text.
The current instance for chaining.
Adds a request location button to the keyboard.
The button text.
The current instance for chaining.
Adds a request poll button to the keyboard.
The button text.
Optionaltype: "quiz" | "regular"The type of the poll button.
The current instance for chaining.
Adds a request users button to the keyboard.
The button text.
The request ID.
Optionaloptions: Omit<KeyboardButtonRequestUsers, "requestId">Additional options for the button.
The current instance for chaining.
Sets the keyboard to be resized or not.
OptionalisEnabled: booleanIndicates whether the keyboard should be resized.
The current instance for chaining.
Adds a new row of buttons to the keyboard.
The buttons to add.
The current instance for chaining.
Sets the keyboard as selective or not.
OptionalisEnabled: booleanIndicates whether the keyboard should be selective.
The current instance for chaining.
Adds a text button to the keyboard.
The button text.
The current instance for chaining.
Converts the keyboard to a JSON format suitable for Telegram API.
An object representing the keyboard in JSON format.
Adds a web app button to the keyboard.
The button text.
The URL of the web app.
The current instance for chaining.
StaticfromCreates a Keyboard instance from another instance or a 2D array of buttons.
The source Keyboard instance or 2D array of buttons.
A new instance of Keyboard.
StaticrequestCreates a request chat button.
The button text.
The request ID.
Optionaloptions: Omit<KeyboardButtonRequestChat, "requestId">Additional options for the button.
The created request chat button.
StaticrequestCreates a request contact button.
The button text.
The created request contact button.
StaticrequestCreates a request location button.
The button text.
The created request location button.
StaticrequestCreates a request poll button.
The button text.
Optionaltype: "quiz" | "regular"The type of the poll button.
The created request poll button.
StaticrequestCreates a request users button.
The button text.
The request ID.
Optionaloptions: Omit<KeyboardButtonRequestUsers, "requestId">Additional options for the button.
The created request users button.
StatictextCreates a text button.
The button text.
The created text button.
StaticwebCreates a web app button.
The button text.
The URL of the web app.
The created web app button.
Represents a custom keyboard for Telegram bots.