Hotfix: uses oauth
Quick fix for an issue #1588 that worked for me. Feel free to merge it if it's useful for ya. I suppose if you wanted it be done professional-like you'd add another GUI window for this and explain everything to the user. People running this in their VMs would still need to see the logs anyway to do this. The documentation on the website has to be updated, unless you figure out any other way to do this more efficiently, but I doubt you can as google themselves supply the code and you have to enter it specifically on their website.
In this case I just tailed the logs with:
sudo journalctl -u JMusicBot -n 100
Saw the log:
YoutubeOauth2Handler: !!! DO NOT AUTHORISE WITH YOUR MAIN ACCOUNT, USE A BURNER !!! YoutubeOauth2Handler: OAUTH INTEGRATION: To give youtube-source access to your account, go to https://www.google.com/device and enter code XXXXXXXXXX YoutubeOauth2Handler: !!! DO NOT AUTHORISE WITH YOUR MAIN ACCOUNT, USE A BURNER !!! YoutubeOauth2Handler: ==================================================
Went to the website, entered the code. The bot now works. I didn't test much, but everything looks fine.
I can take a look a bit more in-depth if you have any suggestions, but I didn't really do this to complete this ticket, this was more for myself, but thought I'd share, maybe somebody finds this helpful as there isn't much documentation on the new lavalink version.
I guess smartest thing would be the bot DMing the owner on discord with the Google code and the link. Makes it simple.
Thanks for the contribution! I just got around to making a more complete implementation in #1670 where OAuth2 is a config option & the refresh token gets automatically saved to a file, so users wont have to go through the login process again, so it's for the best this PR gets superseded by #1670.