I want the action buttons to be rendered in separate rows on the Telegram UI. In the code below, all buttons are shown in one line. How can I ensure that one button will be shown per line?

class ActionPleaseRephrase(Action): def name(self) -> Text: return "action_please_rephrase"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
    buttons = [
        {"title": "ካንሰር", "callback_data": "/cancer"},
        {"title": "ጡት ካንሰር", "callback_data": "/brest_cancer"},
        {"title": "ሳንባ ካንሰር", "callback_data": "/lung_cancer"},
        {"title": "ስኳር በሽታ", "callback_data": "/diabetes"},
        {"title": "ደም ግፊት", "callback_data": "/hypertension"},
    ]
    

    dispatcher.utter_message(text="የጠየቁት ጥያቄ ሊገባኝ አልቻለም እባኮትን ጥያቄዎትን እንደገና ይጻፉ። ወይንም ከታች ያሉትን ምርጫ ይምረጡ", buttons=buttons,json_message=True)

    return []
0

There are 0 best solutions below