Closed arcreigh closed 4 years ago
Hi,
Same permissions as the invite link for the official instance on the readme.
The official instance can be invited using the invite link on the readme. To invite your own bot instance you need to create your own invite link on your discord developer portal by creating an application, attaching a bot account and then creating an OAuth URL for the bot scope.
The help command can be used to fetch a list of all commands or the help page for a specific command. There's also a list available on the top.gg page for the official bot.
So we managed to get the bot in but some details in your readme are missing. Such as what URI is used for return when logging into spotify. The spotify API config needs that. Additionally I have a systemd service file I created so that this can run as a service.
I’d love to help document this a bit better for those that find the project as the bot is feature rich.
The only issue is that it exhausts the youtube api limit RAPIDLY. A new project is only allocated 10k queries and it seems like even when we try to play through spotify it uses the youtube api. That may be us not knowing the commands syntax which is a bit lengthy for a music bot. It’d be nice if we could say $spotify (spotify single/playist url) and it would just play. Or $youtube (single/playlist) but I may just need to use your alias command to get to that point.
Sent with GitHawk
Hi! I'm helping @arcreigh with his setup. We figured out the spotify API callback URL.
Noticing how YouTube's Data API works, a search takes up almost 100 queries, with a max of 10,000/day. What does the YOUTUBE_API_DAILY_QUOTA do? Slowly limit queries and stop before the value?
We are switching from JMusicBot as this has spotify, but it seems both implementation are completely different, one scraping the page, the other being a bit more official using the API, haha.
Edit: Side note, I love how the bot has a web queue page to see what the bot has in the queue and if its playing or not. That's killer.
Setting the YOUTUBE_API_DAILY_QUOTA does switch to scraping web pages from using the YouTube API when the quota usage reaches a certain point (although a few operations, such as searching a playlist on youtube, still require the API). If the YOUTUBE_API_DAILY_QUOTA is lower than 50k the YouTubeService will stop using the YouTube API where it can when the quota usage reaches 50% (else it's 75%). I was lucky enough to create a YouTube API project when you still got 1M quota :). Also it is important to note that playing a Spotify track that you've never played before is expensive quota-wise because it requires a YouTube search (which as you've pointed out costs 100 quota) BUT botify will remember the resulting video ID of the lookup and store it in the DB as a SpotifyRedirectIndex entity, so listening to the same track again is much less expensive than searching it on YouTube. SpotifyRedirectIndex entities are refreshed by the RefreshSpotifyRedirectIndicesTask cron job, which runs every night at 3 AM and re-searches indices that haven't been updated in 4 weeks and have been used within the last 14 days, unused indices are deleted. All of this is necessary because it is not possible to stream tracks directly from Spotify (unless you use the $preview argument, which uses the 30 second preview link provided by the Spotify API).
It’d be nice if we could say $spotify (spotify single/playist url) and it would just play. Or $youtube (single/playlist) but I may just need to use your alias command to get to that point.
I'm not 100% sure what you mean there but typing .play trackname
is enough to play a spotify track, as spotify is default (this can be changed using the "default source" property), assuming you set the prefix to ".". If you want to be able to type .youtube videoname
and have that command be equivalent to typing .play $youtube videoname
you can create a preset like such: .preset "play $youtube %s" $as youtube
. That would enable you to type .youtube videoname
and also .youtube $list listname
. Here it is also important to point that botify allows you to simply paste any URL (including open.spotify URLs and Spotify URIs in the form spotify:track:id) and pasting the YouTube link is cheaper as no API search request is required (just so you know if you already have the link, else the searching via botify directly is obviously more convenient).
If you like the current web pages you're gonna love the webapp in the works for botify 2 ;)
Hello robin!
I need some help getting this setup.
What permissions under discord does this bot need?
What do I do to get the bot to join the discord server?
Is there an entire list of commands available?