claudia-bot-builder-fb
Version:
Create chat-bots for various platforms and deploy to AWS Lambda quickly
22 lines (19 loc) • 437 B
JavaScript
module.exports = function alexaReply(botResponse, botName) {
if (typeof botResponse === 'string' && botName)
return {
response: {
outputSpeech: {
type: 'PlainText',
text: botResponse
},
card: {
type: 'Simple',
title: botName || '',
content: botResponse
},
shouldEndSession: true
}
};
return botResponse;
};
;