Skip to content

Instantly share code, notes, and snippets.

@chatasweetie
Created July 22, 2019 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chatasweetie/78fc659fa3c3ca2e824400e9ac74389a to your computer and use it in GitHub Desktop.
Save chatasweetie/78fc659fa3c3ca2e824400e9ac74389a to your computer and use it in GitHub Desktop.
recordsIntentFulfillment
/**
* Records which options the user has complete
* @param {obj} conv, the conversation object.
* @param num conv, the conversation object.
* @return {null} none.
*/
function recordsIntentFulfillment(conv, intentName) {
const convertIntentValue = {
'gdg': 0,
'next event': 1,
'last event': 2,
'members': 3,
'organizer': 4,
};
conv.data.intentFulfilled[convertIntentValue[intentName]] = 1;
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment