switchblade
switchblade copied to clipboard
Google Assistant Integration
Now that we can have webhooks on the bot (thanks, dokku!), we could try to make some integrations to Google Assistant:
Ok google, ask Switchblade to play darude sandstorm
Ok google, set the volume to 150
We would obviously have to somehow authenticate the users, just like DBL does.
Nah, Just play it on all servers when someone asks for it. or maybe on a random server. That would be fun 😃
HAHAHAHHAHAHAHAH
that would be amazing though
also: Google gives free t-shirts n' shit by doing Google Integrations w/ Assistant
That's what I'm aiming for
yeah, but only you will get the t-shirts, so fuck you
Could use the connections from #748 to connect the user to his google account
Yup. We could also let users login to discord right from Google Assistant if they prefer to. DBL does that.
yes and this will make a connection
yes and this will make a connection
wait, in the g assistant it will only save the id i think, so it wont be a connection or anything
No? You can store whatever you want
https://developers.google.com/actions/assistant/save-data
No? You can store whatever you want
@dpaiv0 no, i mean like, it will be saving the discord user id on the g assistant, and not switch will be saving the google account connected
Ok, serious talk now. I've finally got a Google Home Mini, and am now motivated to get this to work.
We'll need to create our own oAuth thing, and use the tokens generated by it to authenticate on a few new webhooks we'll create:
-
/webhooks/music/play
-
/webhooks/music/pause
(also used for resume, but this might be a bad idea) -
/webhooks/music/shuffle
-
/webhooks/music/skip
-
/webhooks/music/bassboost
These will be used by Dialogflow to tell the bot when to do stuff. We'll then use the oAuth token sent by DF to figure out which user is performing the action, and in which voice channel they're currently in.
https://dialogflow.com/docs/getting-started