GramIO API Reference / @gramio/contexts/dist / MenuButton
Class: MenuButton
Defined in: contexts/index.d.ts:4228
This object describes the bot's menu button in a private chat.
Constructors
Constructor
new MenuButton(
payload):MenuButton
Defined in: contexts/index.d.ts:4230
Parameters
| Parameter | Type |
|---|---|
payload | Record<string, any> & TelegramMenuButtonCommands | Record<string, any> & TelegramMenuButtonWebApp | Record<string, any> & TelegramMenuButtonDefault |
Returns
MenuButton
Properties
| Property | Type | Defined in |
|---|---|---|
payload | Record<string, any> & TelegramMenuButtonCommands | Record<string, any> & TelegramMenuButtonWebApp | Record<string, any> & TelegramMenuButtonDefault | contexts/index.d.ts:4229 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4232
Returns
string
text
Get Signature
get text():
any
Defined in: contexts/index.d.ts:4236
Text on the button
Returns
any
type
Get Signature
get type():
"default"|"commands"|"web_app"
Defined in: contexts/index.d.ts:4234
Type of the button
Returns
"default" | "commands" | "web_app"
webApp
Get Signature
get webApp():
WebAppInfo
Defined in: contexts/index.d.ts:4242
Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.