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.
Builds the keyboard structure.
The built keyboard structure.
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 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.
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 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.
Adds a new row of buttons to the keyboard.
The buttons to add.
The current instance for chaining.
Converts the keyboard to a JSON format suitable for Telegram API.
An object representing the keyboard in JSON format.
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.