kevin-mitchell / alexa-app

Set of classes to make creating Amazon Alexa Skills Kit (ASK) applications easier with Laravel and Lumen
MIT License
97 stars 47 forks source link

New directive "Delegate" & fix reprompts #33

Closed S43534 closed 7 years ago

vrajroham commented 6 years ago

@S43534 Could you provide example for delegate feature?

S43534 commented 6 years ago

It was improved by @Olofguard lately. Please see https://github.com/develpr/alexa-app/commits/master/src/Response/Directives/Dialog/Delegate.php - it has some documentation.

I use it something like this:

if (array_get(Alexa::request(), 'request.dialogState') == 'STARTED' || array_get(Alexa::request(), 'request.dialogState') == 'IN_PROGRESS') {
            return (new AlexaResponse())->endSession(false)->withDirective(new Delegate());
        }
vrajroham commented 6 years ago

@S43534 Works like charm. Thanks