ReplyKeyboardBuilder
classFluent builder for a custom reply keyboard (ReplyKeyboardMarkup).
Declaration
declare class ReplyKeyboardBuilder Methods
oneTime(value?: boolean): this;| Parameter | Type |
|---|---|
| value? | boolean |
Returns this
Hide the keyboard after one use.
persistent(value?: boolean): this;| Parameter | Type |
|---|---|
| value? | boolean |
Returns this
Keep the keyboard persistently open.
placeholder(text: string): this;| Parameter | Type |
|---|---|
| text | string |
Returns this
Set the placeholder shown in the input field while the keyboard is active.
requestContact(text: string): this;| Parameter | Type |
|---|---|
| text | string |
Returns this
Add a button that requests the user's phone number.
requestLocation(text: string): this;| Parameter | Type |
|---|---|
| text | string |
Returns this
Add a button that requests the user's location.
requestPoll(text: string, type?: T.KeyboardButtonPollType['type']): this;| Parameter | Type |
|---|---|
| text | string |
| type? | T.KeyboardButtonPollType['type'] |
Returns this
Add a button that asks the user to create a poll.
resize(value?: boolean): this;| Parameter | Type |
|---|---|
| value? | boolean |
Returns this
Resize the keyboard to fit its buttons.
selective(value?: boolean): this;| Parameter | Type |
|---|---|
| value? | boolean |
Returns this
Show the keyboard only to specific users in a group.
text(text: string): this;| Parameter | Type |
|---|---|
| text | string |
Returns this
Add a plain text button (sends its label as a message when tapped).
toJSON(): T.ReplyKeyboardMarkup;Returns T.ReplyKeyboardMarkup
Produce the ReplyKeyboardMarkup object, dropping any trailing empty row.