Can a custom action call dispatcher.utter_message(template='utter_something') twice?

I’m wondering if I can call utter_message() twice in the same custom action?

Alternatively, could I have a story like this:

## My story
* user_intent
  - cusom_action_that_utters_a_message
  - utter_different_message

My stories that are written like the above example don’t seem to be uttering the second message (utter_different_message). Do I need my custom action to return a specific value or maybe some specific policy for this to work?

Thanks.

Yes, you can call it twice. If you have something like this in your custom action:

dispatcher.utter_message('text')
dispatcher.utter_message('text')

It should work just fine.

Thanks. I just realized it’s a problem with my front end only processing the first message.

hi, I do this in custom action, rasa shell display well, but in rasa x, I only get the first dispatcher result, and the second was not displayed, how this happen?

@k1m how to display multiple dispatcher in rasa x… it is displaying in rasa shell but not in rasa x