class ActionGetEmail(Action):
def name(self) -> Text:
return "action_get_email"
def run(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message("your email must be write like that example marysmith90@gmail.com")
email= ((tracker.latest_message)['text'])
regex_email =r"([A-Za-z0-9]+)@\S+"
email_matched = re.findall(regex_email,email)
if email_matched is not None :
dispatcher.utter_message("your email has been accept:{}".format(email_matched))
else :
dispatcher.utter_message("your email has been not accept")
return []
when I run rasa shell the bot said :
your email must be write like that example marysmith90@gmail.com
your email has been accept:[]
even I did not write email