Created
April 11, 2021 15:40
-
-
Save kinisoftware/e881dd3509366845b2189c39d67c79e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CancelAndStopIntentHandler : RequestHandler { | |
override fun canHandle(input: HandlerInput) = | |
input.matches( | |
intentName("AMAZON.StopIntent") | |
.or(intentName("AMAZON.CancelIntent")) | |
.or(intentName("AMAZON.PauseIntent")) | |
) | |
override fun handle(input: HandlerInput) = input.responseBuilder | |
.addAudioPlayerStopDirective() | |
.withShouldEndSession(true) | |
.build() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment