Keyboard class

Card builder class that simplifies building keyboard cards.

Constructors

Keyboard(Session)

Creates a new ThumbnailCard.

Methods

buttons(ICardAction[] | IIsCardAction[])

Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard.

toAttachment()

Returns the JSON for the card

Constructor Details

Keyboard(Session)

Creates a new ThumbnailCard.

new Keyboard(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

buttons(ICardAction[] | IIsCardAction[])

Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard.

function buttons(list: ICardAction[] | IIsCardAction[])

Parameters

Returns

toAttachment()

Returns the JSON for the card

function toAttachment()

Returns