switchblade icon indicating copy to clipboard operation
switchblade copied to clipboard

Google Assistant Integration

Open pedrofracassi opened this issue 6 years ago • 18 comments

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.

pedrofracassi avatar Jan 10 '19 16:01 pedrofracassi

Nah, Just play it on all servers when someone asks for it. or maybe on a random server. That would be fun 😃

justandras avatar Jan 10 '19 16:01 justandras

HAHAHAHHAHAHAHAH

jaxxibae avatar Jan 24 '19 14:01 jaxxibae

that would be amazing though

jaxxibae avatar Jan 24 '19 14:01 jaxxibae

also: Google gives free t-shirts n' shit by doing Google Integrations w/ Assistant

jaxxibae avatar Jan 24 '19 14:01 jaxxibae

That's what I'm aiming for

pedrofracassi avatar Jan 24 '19 15:01 pedrofracassi

yeah, but only you will get the t-shirts, so fuck you

jaxxibae avatar Jan 31 '19 12:01 jaxxibae

Could use the connections from #748 to connect the user to his google account

metehus avatar Mar 18 '19 15:03 metehus

Yup. We could also let users login to discord right from Google Assistant if they prefer to. DBL does that.

pedrofracassi avatar Mar 18 '19 18:03 pedrofracassi

yes and this will make a connection

metehus avatar Mar 19 '19 11:03 metehus

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

metehus avatar Mar 20 '19 00:03 metehus

No? You can store whatever you want

jaxxibae avatar Mar 20 '19 10:03 jaxxibae

https://developers.google.com/actions/assistant/save-data

jaxxibae avatar Mar 20 '19 10:03 jaxxibae

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

metehus avatar Apr 01 '19 21:04 metehus

Ok, serious talk now. I've finally got a Google Home Mini, and am now motivated to get this to work.

pedrofracassi avatar Jul 03 '19 00:07 pedrofracassi

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.

pedrofracassi avatar Jul 03 '19 00:07 pedrofracassi

https://dialogflow.com/docs/getting-started

pedrofracassi avatar Jul 03 '19 00:07 pedrofracassi