Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageButton

Hierarchy

  • MessageButton

Index

Properties

button: ButtonLike

Methods

  • [custom](): {}
  • Emulates the behaviour of clicking this button.

    If it's a normal KeyboardButton with text, a message will be sent, and the sent Message <Message> returned.

    If it's an inline KeyboardButtonCallback with text and data, it will be "clicked" and the BotCallbackAnswer returned.

    If it's an inline KeyboardButtonSwitchInline button, the StartBot will be invoked and the resulting updates returned.

    If it's a KeyboardButtonUrl, the URL of the button will be returned.

    If it's a KeyboardButtonRequestPhone, you must indicate that you want to sharePhone=True in order to share it. Sharing it is not a default because it is a privacy concern and could happen accidentally.

    You may also use sharePhone=phone to share a specific number, in which case either str or InputMediaContact should be used.

    If it's a KeyboardButtonRequestGeoLocation, you must pass a tuple in shareGeo=[longitude, latitude]. Note that Telegram seems to have some heuristics to determine impossible locations, so changing this value a lot quickly may not work as expected. You may also pass a InputGeoPoint if you find the order confusing.

    Parameters

    Returns Promise<undefined | null | string | Message | TypeUpdates | BotCallbackAnswer>

Constructors

Accessors

  • get text(): string
  • get data(): undefined | Buffer
  • get inlineQuery(): undefined | string
  • get url(): undefined | string

Generated using TypeDoc