I am trying to implement a user guide thing where users can click buttons to navigate the guide. here is custom action for it:
class ActionGuideToNewUsers(Action):
def name(self) -> Text:
return "action_guide_to_new_users"
async def run(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]
) -> List[Dict[Text, Any]]:
name = "Airaj" # Fetch from DB
buttons = [{"title": "Yes", "payload": "/guide"}, {"title": "No", "payload": "/deny_guide"}]
message = "Hey {}! Would you like to know about our services?".format(name)
custom = [{"input_type": "disable", "exit_button": "false"}]
dispatcher.utter_message(text=message, buttons=buttons, elements=custom)
return []
The issue arises when users enter text instead of clicking the button, so how can I disable text input when buttons are active? I am using Rasa 2.0.2, Rasa-SDK 2.0.0 and Rasa-x 0.33 to test things out.
Thanks!