Created
August 5, 2019 21:34
-
-
Save Fleker/923664f7cef40fd3b65aac41efd243eb to your computer and use it in GitHub Desktop.
Add newest tracks, and help intents
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
app.intent('New', (conv: Conv) => { | |
const newestTracks = conv.data.json.tracks.slice(0, 3) | |
conv.ask('The last three tracks added to Tabletop Audio are: ' + | |
newestTracks.map(track => track.track_title) + | |
'. What do you want to listen to?') | |
conv.ask(new Suggestions(...newestTracks.map(track => track.track_title))) | |
}) | |
app.intent('Help', (conv: Conv) => { | |
conv.ask('Tabletop Audio is the premier advertising-free, free-to-use, and user-supported ' + | |
'ambient game audio site on the Internet. Visit the website to view a complete list of ' + | |
'tracks. You can also ask me "What are the latest tracks", ask for a specific song like ' + | |
`${conv.data.json.tracks[0].track_title}, or ask to play music from a genre like ` + | |
`${conv.data.json.tracks[0].track_genre}. What do you want to do?`) | |
conv.ask(new BasicCard({ | |
title: 'Tabletop Audio', | |
image: new Image({ | |
url: 'https://images.tabletopaudio.com/header3.png', | |
alt: 'Tabletop Audio banner image' | |
}), | |
buttons: new Button({ | |
title: 'View website', | |
url: 'https://tabletopaudio.com' | |
}) | |
})) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment