Hi,
I am working on a dialogflow/google assistant app and im getting the following error in my console when trying to call the intent:
Error -----------------------------------------------------------------
Message:
GoogleAction is not defined
Stack:
ReferenceError: GoogleAction is not defined
at GoogleAction.SendHelpIntent (C:\Projects\g-starvoice\src\app.js:55:17)
at Function.applyHandle (C:\Projects\g-starvoice\node_modules\jovo-framework\src\middleware\Handler.ts:217:43)
at handle (C:\Projects\g-starvoice\node_modules\jovo-framework\src\middleware\Handler.ts:46:23)
----------------------------------------------------------------------
Request details:
this.$googleAction initialized
this.$type: {"type":"INTENT"}
this.$session.$data : {}
this.$nlu : {"intent":{"name":"CarouselIntent"}}
this.$inputs : {}
----------------------------------------------------------------------
The following is the intent that is throwing the error. How can i fix this? I can not seem to find a solution in the docs and can’t find an example where googleAction is initialised. Line 55 in the error corresponds with the first line of code in this intent: let itemOne = new GoogleAction.OptionItem();
CarouselIntent() {
let itemOne = new GoogleAction.OptionItem();
itemOne
.setTitle('Option 1')
.setDescription('Description of option 1')
.setKey('OptionOne')
.addSynonym('Option One');
let carousel = new GoogleAssistant.Carousel();
carousel.addItem(itemOne);
this.$googleAction.showCarousel(carousel);
this.ask('Testing');
}