How do I make the corners of a button rounded? Viber bot

413 Views Asked by At
{
"viber": {
    "type": "keyboard",
    "inputFieldState": "hidden",
    "buttons": [
        {
            "ActionBody": "/test",
            "ActionType": "reply",
            "BgColor": "#FF0000",
            "Frame.CornerRadius": "4",  
            "Columns": 6,
            "Rows": 1,
            "Text": "<b><font color=\"#FFFFFF\">text</font></b>",
            "TextHAlign": "center",
            "TextSize": "regular",
            "TextVAlign": "middle",
            "Silent": false
        }
    ]
}}

I'm trying to do it through a parameter "Frame.CornerRadius": "4", but it doesn't work like that, the buttons remain rectangular

2

There are 2 best solutions below

0
On

Use Rich Media message type and add a Keyboard there. Example:

{
    "Type": "rich_media",
    "BgColor": "#FF0000",
    "ButtonsGroupRows": 6,
    "ButtonsGroupColumns": 1,
    "Buttons": [
        {
            "ActionType": "reply",
            "ActionBody": "/test",
            "BgColor": "#FF0000",
            "Columns": 6,
            "Rows": 1,
            "Text": "<b><font color=\"#FFFFFF\">text</font></b>",
        }
    ],
}
1
On

try this

{
   "receiver":"OSpQxHz/54fXXjlrLEvDWg==",
   "min_api_version":6,
   "type":"text",
   "text":"Hello world",
   "keyboard":{

    "DefaultHeight": true,
        "BgColor": "#FFFFFF",
        "Buttons": [{
                   "Frame": {
            "BorderWidth": "01",
            "BorderColor": "#51b46d",
            "CornerRadius" :"9"
             },
            "Columns": 6,
            "Rows": 1,
            "BgColor": "#2db9b9",
            "ActionBody": "www.tut.by",
            "Image": "www.tut.by/img.jpg",
            "Text": "Key text",
            "TextVAlign": "middle",
            "TextHAlign": "center",
            "TextOpacity": 60,
            "TextSize": "regular"
        }]
   }
}