Discord bot to find songs on different platforms.
Adds message context commands that find links to songs on supported platforms in the message, gets the song title and artist using the URLs, uses said title and artist to search on the selected platform, and sends back an ephemeral message containing links to the first search result of the songs.
- Clone the repository
- Give your Discord bot these scopes and permissions:
bot
applications.commands
Read Message History
Send Messages
Send Messages In Threads
Read Messages/View Channels
Use Application/Slash Commands
- Define these environment variables** (you can alternatively create a
.env
file in the root directory with these values defined as well):BOT_TOKEN
: your Discord bot's tokenSPOTIFY_CLIENT_ID
: your Spotify app's client IDSPOTIFY_CLIENT_SECRET
: your Spotify app's client secretSOUNDCLOUD_CLIENT_ID
: open your browser's developer tools' network tab in SoundCloud, do some action on the webpage (e.g. click a button or refresh the page), and locate theclient_id
paramter in the payload tab of a packetYOUTUBE_API_KEY
: go to YouTube's deveoper console, create a project, go to its Credentials page, create a Simple Key, and copy its API key
- Run with
graldew run
or build withgradlew build
- the built jar can be found in
/<project root>/build/libs/
- the built jar can be found in