Skip to main content

Keyboard

Button which renders in keyboard location.

extends​

KeyboardComponent

constructor(bot)​

added in 1.1.0
  • bot - <Object>. Telegraf instance.
  • name - <string>. Button name, or text which user will see.
  • options? - <Object>
    • prefix - <string>. Name of the control. Default is @tlgr/button
    • disableUUID - <boolean>. Enable/Disable uuid generation for button control. It guarantee about button has be unique name. Default is false
    • alert - <Object>. Alert options. Default is undefined
      • text- <string>. Alert text.
      • mode - <string>. Alert mode. Possible values: text or modal. Default is text
      • show - <boolean>. Show modal or not. Default is false.

properties​

uuid​

added in 1.1.0

modifiers​

  • readonly

description​

Random generated hash. Returns undefined in case if options.disableUUID=true

name​

added in 1.1.0

modifiers​

  • readonly
  • getter

description​

Resolved button name. This property consist of options.prefix and options.disableUUID.