This bot allows users to give me (Angel) songs to listen to from Spotify and
add them in a single playlist, utilizing the Spotify Web API. I wanted to make
this bot because I wanted to experiment with multiple APIs: Twitch API, Spotify Web API,
and Twitter API.
The only valid links RequestBot can accept are either Spotify tracks or albums. The bot will only accept the album link if it has 20 tracks or less in it.
The available commands are listed below:
*
= Discord only, **
= Discord and Twitch
- r!help *
- r!ping *
- r!add **
- r!view **
- r!recent *
- r!np **
With each song/album submission, the bot keeps track where the submission came from and who submitted it, taking their Discord username and tag or Twitch username and storing it in a database.
On Discord/Twitch, send the following command in a Discord server with the bot in it or
in my own Twitch chat:
r!add https://open.spotify.com/track/2CgOd0Lj5MuvOqzqdaAXtS
This will add a song to my playlist, and the bot will send a confirmation message to let you know that it has been added, as well as how many songs are in the playlist.
Twitter support has been removed as of September 10, 2024 due to the changes in the API.- First off, you'd need to grab a bunch of api keys for this application.
This should be pasted in a
config.properties
file.
- Use the hidden Discord command
r!set
to get your authorization code. - The code will be found in the URL address. Use the
r!set
command again but provide your authorization code.
- Visit the developer dashboard.
- Give your app a name, and click Create.
- Click on the Bot menu on the left side and copy your token.
- Paste the token in the
d_bot_token
field.
- You can use an OAuth Generator page to get your token.
- Copy and paste the token into the
twch_oauth
field.
- Use the hidden Discord command
- Create the required database and tables needed for the bot, which can be found in the tables.sql file.
- Enter your database credentials in the db.properties file.
- If everything was configured correctly, the app should run normally upon executing it.
- JDA/jda-utilities
- Twitch4J
- spotify-web-api
- as well as other backend stuff (jdbc, hikariCP, jackson-core, logback-classic)
Feel free to let me know of any bugs that you discover through my twitter (@angelolz1), which is the best way to reach me!
This is my first time releasing open-source stuff, so my code could probably use some improvements from brilliant people like you! Feel free to open a pull request and describe the changes that you've made. I'll try my best to come back to it as soon as possible!
This project uses the MIT license.