Created
February 12, 2022 17:05
-
-
Save rmtuckerphx/ce9f0656fcb4badaa35816122c09df57 to your computer and use it in GitHub Desktop.
Jovo v4 END w/ OutputTemplate
This file contains 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
import { AlexaPlatform } from '@jovotech/platform-alexa'; | |
import { App } from '@jovotech/framework'; | |
const app = new App({ | |
components: [GlobalComponent, LoveHatePizzaComponent], | |
plugins: [ | |
new AlexaPlatform({ | |
intentMap: { | |
'AMAZON.StopIntent': 'END', | |
'AMAZON.CancelIntent': 'END', | |
} | |
}), | |
], | |
logging: true, | |
}); | |
export { app }; |
This file contains 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
import { Component, BaseComponent, Global, Handle } from '@jovotech/framework'; | |
import { GoodbyeOutput } from '../output/GoodbyeOutput'; | |
@Global() | |
@Component() | |
export class GlobalComponent extends BaseComponent { | |
@Handle({ prioritizedOverUnhandled: true }) | |
END() { | |
return this.$send(GoodbyeOutput); | |
} | |
} |
This file contains 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
import { BaseOutput, Output, OutputTemplate } from '@jovotech/framework'; | |
@Output() | |
export class GoodbyeOutput extends BaseOutput { | |
build(): OutputTemplate | OutputTemplate[] { | |
return { | |
message: 'Goodbye', | |
listen: false, | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment