Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Feb 24, 2019
2 parents 16e0678 + 73db6c7 commit fed85bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Binary file modified DC-Metro.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion functions/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"trailingComma": "es5",
"bracketSpacing": false,
"arrowParens": "always",
"parser": "babylon"
"parser": "babel"
}
17 changes: 16 additions & 1 deletion functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,17 @@ app.intent(
}
);

/**
* DiagFlow intent for the different help command.
*/
app.intent('help_intent', async (conv: any) => {
conv.ask(new Suggestions(['Train Commands', 'Bus Commands', 'Feedback']));

return conv.ask(
`I'm able to tell you when the next train or bus is arriving at a station or stop in the Washington DC area. To find out how to use my commands please say 'Train Commands' or 'Bus Commands.`
);
});

/**
* DiagFlow intent for cancel commands.
*/
Expand All @@ -475,7 +486,11 @@ app.intent('default_welcome_intent', (conv) => {
: hours >= 18
? 'Evening'
: 'Morning'
}, welcome to DC Metro! I'm able to tell you when the next train or bus is arriving at a station or stop in the Washington DC area. To find out how to use my commands please say 'Train Commands' or 'Bus Commands'.`
}, ${
conv.user.last.seen
? 'welcome back to DC Metro! If you need help at all just ask.'
: `welcome to DC Metro! I'm able to tell you when the next train or bus is arriving at a station or stop in the Washington DC area. To find out how to use my commands please say 'Train Commands' or 'Bus Commands.`
}`
);
});

Expand Down

0 comments on commit fed85bd

Please sign in to comment.