Skip to content

A Discord/Twitch/Twitter Bot that allows people to give me (Angel!) spotify songs/albums and put it in a playlist through Spotify's API.

License

Notifications You must be signed in to change notification settings

angelolz/RequestBot

Repository files navigation

Angel's Request Bot

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.

Bot Usage

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.

Discord/Twitch

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.

Examples

Discord Bot Usage

Discord Bot Usage

Twitch Bot Usage

Twitch Bot Usage

Twitter

Twitter support has been removed as of September 10, 2024 due to the changes in the API.

Development Setup

  1. First off, you'd need to grab a bunch of api keys for this application. This should be pasted in a config.properties file.

    Spotify

    • 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.

    Discord

    • 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.

    Twitch

    • You can use an OAuth Generator page to get your token.
    • Copy and paste the token into the twch_oauth field.
  2. Create the required database and tables needed for the bot, which can be found in the tables.sql file.
  3. Enter your database credentials in the db.properties file.
  4. If everything was configured correctly, the app should run normally upon executing it.

Dependencies Used:

Support

Feel free to let me know of any bugs that you discover through my twitter (@angelolz1), which is the best way to reach me!

Contributing

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!

License

This project uses the MIT license.

About

A Discord/Twitch/Twitter Bot that allows people to give me (Angel!) spotify songs/albums and put it in a playlist through Spotify's API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages