Skip to content

GramIO API Reference / @gramio/contexts/dist / MenuButton

Class: MenuButton ​

Defined in: contexts/index.d.ts:4707

This object describes the bot's menu button in a private chat.

Constructors ​

Constructor ​

new MenuButton(payload): MenuButton

Defined in: contexts/index.d.ts:4709

Parameters ​

ParameterType
payloadRecord<string, any> & TelegramMenuButtonCommands | Record<string, any> & TelegramMenuButtonWebApp | Record<string, any> & TelegramMenuButtonDefault

Returns ​

MenuButton

Properties ​

PropertyTypeDefined in
payloadRecord<string, any> & TelegramMenuButtonCommands | Record<string, any> & TelegramMenuButtonWebApp | Record<string, any> & TelegramMenuButtonDefaultcontexts/index.d.ts:4708

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:4711

MDN

Returns ​

string


text ​

Get Signature ​

get text(): any

Defined in: contexts/index.d.ts:4715

Text on the button

Returns ​

any


type ​

Get Signature ​

get type(): "default" | "commands" | "web_app"

Defined in: contexts/index.d.ts:4713

Type of the button

Returns ​

"default" | "commands" | "web_app"


webApp ​

Get Signature ​

get webApp(): WebAppInfo

Defined in: contexts/index.d.ts:4721

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.

Returns ​

WebAppInfo