I’m using the following in my project:
let basicCard = new GoogleAssistant.BasicCard()
.setTitle(videoTitle)
.setFormattedText(videoSubtitle)
.addButton('WATCH VIDEO', videoSourceUrl);
this.$googleAction.showBasicCard(basicCard);
Despite having required in the GoogleAssistant Object in app.js
:
const { GoogleAssistant } = require("jovo-platform-googleassistant");
I get an error message in the logs, saying that BasicCard is not a contructor:
{ "errorMessage": "GoogleAssistant.BasicCard is not a constructor", "errorType": "TypeError", "stackTrace": [ "GoogleAction.ExampleIntent (/var/task/app.js:113:25)", "Function.applyHandle (/var/task/node_modules/jovo-framework/dist/src/middleware/Handler.js:178:43)", "handle (/var/task/node_modules/jovo-framework/dist/src/middleware/Handler.js:38:23)", "<anonymous>" ] }
Strange, because I’ve checked and the BasicCard.js
response file is in the jovo-platform-googleassistant
folder.
Any ideas?