P
P
PegasusPega2020-07-12 14:41:58
API
PegasusPega, 2020-07-12 14:41:58

How to make VK buttons work?

The VK buttons do not work and I can not understand what the problem is. Sorry for no tabs.

const {VK, Keyboard} = require('vk-io');
const keyboard = Keyboard;


    cmd(/^(?:Кнопки)$/i, 0, (send) => {
send(`1`);
{
keyboard:JSON.stringify(
{
"one_time": true,
"buttons": [
[{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Профиль"
},
"color": "primary"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Помощь"
},
"color": "positive"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Донат"
},
"color": "negative"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Игры"
},
"color": "default"
}],
[{
"action": {
"type": "text",
"payload": "{}",
"label": "Убрать клавиатуру"
},
"color": "negative"
}]
]
})
}
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladlen Hellsite, 2020-07-13
@PegasusPega

The library has an option to use the keyboard using standard tools, a link to the documentation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question