Inspiration
Our project was sparked by the Marina Muse player, a collaborative music experience where our peers would take turns curating playlists with a diverse mix of genres. This unique atmosphere exposed us to an array of music we may not have discovered on our own and served as the driving force behind the creation of the Music Rec Bot. The experience also instilled a more open-minded approach towards exploring new musical styles.
What it does
The Music Rec Bot includes two main commands: genre_track_recommend and recommend_url. The genre_track_recommend command generates a set of 5 song recommendations based on a given genre input using the Spotify API. If no songs are found for the input genre, the command will return a list of available genres for the user to choose from. The recommend_url command generates a set of 5 song recommendations based on a given Spotify song URL input (song or artist link).
How we built it
We did research on what Spotify and Discord API's were and utilized to create a Music Recommendation Bot. The script listens for user commands in the Discord server and generates music recommendations based on the input parameters. To use the Spotify API, the script first obtains authorization through the SpotifyClientCredentials method and creates a Spotipy object for making API requests. The Discord bot is created through the Discord Bot API with a specified command prefix and intents.
Challenges we ran into
One issue that we encountered during the development of the Music Recommendation Bot was understanding and configuring the Intents within the Discord API. Intents are used to specify which events the bot should be able to handle and receive, such as message reactions and user voice status. Without proper configuration of the Intents, the bot may not function as expected. Another challenge we faced was securely storing the Discord API token used for authentication. To avoid exposing sensitive information, we needed to learn how to save the token into a virtual environment variable using the dotenv package. This required additional research and learning, but was necessary to ensure the security of the token.
Accomplishments that we're proud of
We were able to successfully integrate the Spotify API into our bot to generate music recommendations based on user input. This required learning how to use the API and configuring the necessary authentication credentials. This was our first time working with API's so we are proud that we got this to work according to the plan.
What we learned
We gained experience in integrating third-party APIs into our project, which allowed us to access additional features and functionality. We were exposed to new programming concepts and technologies throughout the development process, which required us to continuously learn and adapt to new challenges. This allowed us to expand our knowledge and skillsets as developers.
What's next for Discord-Music-Rec-Bot (Ser Tibbles)
Moving forward, there are several potential areas for further development and enhancement of the Music Recommendation Bot. One area for improvement could be the development of a more user-friendly interface, which would make it easier for users to interact with the bot and provide input. There are many additional features that could be added to the bot, such as the ability to recommend albums, playlists, or artists based on user input. Another potential area for future development could be the incorporation of machine learning algorithms to enhance the accuracy and relevance of the bot's recommendations.
Log in or sign up for Devpost to join the conversation.