W
W
Wayix2020-02-27 22:42:05
Node.js
Wayix, 2020-02-27 22:42:05

How to add inline buttons to VK?

getPrivateKeyboard: () => {
    var Keyboard = vk.get().Keyboard;
    let urlButton = [ { action: { type: "open_link", link: "@", label: " купить VkC " } } ];
    let _keyboard = Keyboard.keyboard([
      Keyboard.textButton({ label: ' Клик ', payload: { command: 'klick' }, color: Keyboard.POSITIVE_COLOR }),
      [
        Keyboard.textButton({ label: ' Профиль ', payload: { command: 'profile' }, color: Keyboard.PRIMARY_COLOR }),
        Keyboard.textButton({ label: ' Вывод ', payload: { command: 'outp' }, color: Keyboard.PRIMARY_COLOR }),
      ],
      [
      Keyboard.textButton({ label: '☝ Реф ☝', payload: { command: 'ref' }, color: Keyboard.NEGATIVE_COLOR }),
      Keyboard.textButton({ label: ' Топ ', payload: { command: 'top' }, color: Keyboard.NEGATIVE_COLOR }),
     ]
    ]);
    _keyboard.rows.push(urlButton);
    return _keyboard;
  }
}


How to finish the output inline?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question