Skip to content

A versatile Discord music bot supporting YouTube & Spotify playback, individual user playlists, and robust database integration.

Notifications You must be signed in to change notification settings

shamspias/psychic-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psychic-Discord Music Bot

Psychic-Discord is a powerful and flexible music bot for Discord. It supports playback from YouTube and Spotify, provides playlist management features for individual users, and more!

Technologies Used:

  • Python: The primary language for developing the bot.
  • discord.py: A modern, easy-to-use Python library that allows for interacting with the Discord API.
  • SQLAlchemy: A SQL toolkit and Object-Relational Mapping (ORM) library for Python.
  • MySQL: The primary relational database used for storing user data and playlists.

Design Patterns & Code Structure:

  • Command Pattern: Used to handle different bot commands.
  • Singleton Pattern: For certain utility classes to ensure a single instance.
  • Repository Pattern: For database operations, separating the business logic and database logic.

Project Structure:

  • /cogs: Contains different functionalities of the bot.
    • music: Handles music playback features.
    • playlist: Manages user playlists.
  • /integrations: Contains integration logic for external services like YouTube and Spotify.
  • /database: Contains all database-related logic, models, and operations.
  • /utils: Utility functions and classes.
  • /config: Configuration files for different environments.
  • /tests: Unit tests to ensure code reliability.

Setup & Installation:

  1. Clone the Repository:

    git clone https://github.com/shamspias/psychic-discord.git
    cd psychic-discord
  2. Setup a Virtual Environment (Optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Setup Configuration:

    • Rename example.env to .env.
    • Fill in the necessary details in .env (Bot Token, Database URL, API Keys).
  5. Initialize the Database:

    python -m database.create_tables
  6. Fix Privileged Gateway Intents

  7. Run the Bot:

    python main.py

Usage:

  • !play [song_name/song_url]: Play a song from YouTube or Spotify.
  • !pause: Pause the current song.
  • ... (Add more commands as per your implementation)

Contribution:

Feel free to fork this repository and submit pull requests. All contributions are welcome!

License:

MIT License (Provide a link if you have a LICENSE file in your repo)

About

A versatile Discord music bot supporting YouTube & Spotify playback, individual user playlists, and robust database integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages