Add Delegate Directive - Not working


#1

Hello! I have an existing Alexa skill that I have imported into the Jovo framework with the ultimate goal of deploying it on Google Assistant. I’ve copied in the app logic and I’m in the process of converting the code so that it’s cross-platform compatible. One of the problems I’ve run into is with the .addDelegateDirective method:

Before:
if (!intentObj.slots.interface.value) {
return handlerInput.responseBuilder
.addDelegateDirective(intentObj)
.getResponse();
}

After (what I tried):

if (!intentObj.slots.interface.value) {
return this.addDelegateDirective(intentObj);
}

Obviously I need to replace the handlerInput but I’m not sure how to do it. I also tried this.$alexaSkill.addDelegateDirective(intentObj) which also did not work. When I do a jovo run, I get the error message “this.addDelegateDirective is not a function”.

Any help would be appreciated! Thank you!

PS I’ve been following the instructions in the youtube videos ie https://www.youtube.com/watch?v=JrN9xCTNI7w.


#2

Take a look here, this should help: https://www.jovo.tech/docs/amazon-alexa/dialog-interface#dialog-delegate


#3

Thank you Jan!!! You are awesome