Skip to content

Commit

Permalink
Update actions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bsingh17 authored Aug 10, 2020
1 parent 98e8ade commit c64733e
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def required_slots(tracker):
"username",
"mailid",
"phone_number",
"proceed"

]

@staticmethod
Expand Down Expand Up @@ -50,17 +50,7 @@ def validate_phone_number(
return {"phone_number": value}
else:
return {"phone_number": None,"mailid": None}
def validate_proceed(
self,
value: Text,
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: Dict[Text, Any],
) -> Dict[Text, Any]:
if value.lower() not in self.msg():
return {"proceed": value}
else:
return {"phone_number": None,"proceed": None}


def submit(
self,
Expand All @@ -74,7 +64,7 @@ def submit(



message="ORDER DETAILS:"+"\n\n"+"Name:"+username+"\n"+"Email:"+mailid+"\n"+"Phone Number:"+phone_number+"\n"+"\nThanks for ordering! Your order will be placed soon."
message="DETAILS:"+"\n\n"+"Name:"+username+"\n"+"Email:"+mailid+"\n"+"Phone Number:"+phone_number+"\n"+"\nThanks! for sharing information."
saveFile = open("some.txt", 'a')
saveFile.write(message)
saveFile.close()
Expand Down Expand Up @@ -138,4 +128,3 @@ def submit(
return []



0 comments on commit c64733e

Please sign in to comment.