Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/keyboard"

Index

Enumerations

Classes

Interfaces

Type aliases

Object literals

Type aliases

Button

Object literals

Const button

button: object

location

openApp

  • openApp(appId: number, ownerId?: number, label: string, hash: string): OpenAppButton
  • Creates an app-opening button.

    example
    button.openApp(1, 1, 'My App', 'test')

    Parameters

    • appId: number

      Application ID

    • Default value ownerId: number = null

      Group ID, if app needs to be opened in group context

    • label: string

      Button label

    • hash: string

      Parameters for app navigation

    Returns OpenAppButton

text

  • Creates a text-sending button.

    example
    button.text('Secondary');
    button.text('Secondary', colors.secondary);
    button.text('Secondary', colors.secondary, {a: 'b'});
    
    button.text('Primary', colors.primary);
    button.text('Negative', colors.negative);
    button.text('Positive', colors.positive);

    Parameters

    • Default value label: string = "Button"

      button label

    • Default value color: Color = Color.Secondary

      button color

    • Default value payload: Payload = ""

      button payload, see VK bots docs -> Section 4.3 for more details

    Returns TextButton

vkPay

  • Creates a VK Pay payment button.

    example
    button.vkPay('action=transfer-to-group&group_id=1&aid=10')

    Parameters

    • hash: string

      VK Pay parameters and app id in parameter aid, delimited by &, see VK Pay actions

    Returns VKPayButton

Generated using TypeDoc