InlineKeyboardBuilder
classFluent builder for an inline keyboard (InlineKeyboardMarkup). Buttons are added to the current row; call to start a new one.
Declaration
declare class InlineKeyboardBuilder Methods
callback(text: string, data: string): this;| Parameter | Type |
|---|---|
| text | string |
| data | string |
Returns this
Add a button that sends a callback query with data.
copyText(text: string, copy: string): this;| Parameter | Type |
|---|---|
| text | string |
| copy | string |
Returns this
Add a button that copies text to the clipboard.
login(text: string, loginUrl: T.LoginUrl): this;| Parameter | Type |
|---|---|
| text | string |
| loginUrl | T.LoginUrl |
Returns this
Add a button that logs the user in via Telegram Login.
pay(text: string): this;| Parameter | Type |
|---|---|
| text | string |
Returns this
Add a Pay button (for invoices).
switchInline(text: string, query?: string): this;| Parameter | Type |
|---|---|
| text | string |
| query? | string |
Returns this
Add a button that switches to inline mode in a chosen chat.
switchInlineCurrent(text: string, query?: string): this;| Parameter | Type |
|---|---|
| text | string |
| query? | string |
Returns this
Add a button that switches to inline mode in the current chat.
toJSON(): T.InlineKeyboardMarkup;Returns T.InlineKeyboardMarkup
Produce the InlineKeyboardMarkup object, dropping any trailing empty row.
url(text: string, url: string): this;| Parameter | Type |
|---|---|
| text | string |
| url | string |
Returns this
Add a URL button.