Answer the question
In order to leave comments, you need to log in
How to make buttons in separate rows?
It is necessary that when sending the keyboard, the buttons do not squeeze into one line, but are transferred to different ones.
How to do it?
The code:
keyboard:JSON.stringify(
{
"one_time": false,
"buttons": [
[{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Помощь"
},
"color": "negative"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Бонус"
},
"color": "positive"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"2\"}",
"label": "Админы"
},
"color": "positive"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Питомцы"
},
"color": "primary"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"2\"}",
"label": "Привет"
},
"color": "positive"
}]
]
})
});
}
);
Answer the question
In order to leave comments, you need to log in
"buttons": [
[/* кнопка */, /* кнопка */, /* кнопка */], // 1 ряд
[/* кнопка */, /* кнопка */, /* кнопка */] // 2 ряд
]
Buttons render not in json data.
If there is no such possibility using the API flag for rendering, then no way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question