Skip to content

A Simple Discord.py Music Bot built to play local music files in Discord Stage Channels

License

Notifications You must be signed in to change notification settings

Golgrax/StageMusicBot

 
 

Repository files navigation

StageMusicBot

Run on Replit

Python version GitHub Repo stars GitHub last commit Code style: black wakatime

This bot is made to sit in a Stage Channel, and play music from your local machine 24/7, simple as that!

How to Install:

Please try to follow these instructions first, if find that there is something you are unsure on, feel free to contact me on Discord (https://discord.gg/qBq2WSsgvv) or open an issue, and I'll be more than happy to help.

There are a few requirements needed before you can run this bot, run the command below to install these pre-requisits:

Replit Console:

pip install --upgrade pip
pip install -r requirements.txt
python main.py
  • BOTID = The USER_ID of your bot
  • VOLUME = The volume that the bot will play at (from 0 - 1 as a float/decimal), NOTE: It's at 0.2 by default for a reason, anything above that REALLY hurt
  • STAGENAME = The name of the stage channel you wish for the bot to join. NOTE: this is CaSe sensitive
  • PREFIX = Your chosen bot prefix for both

Environment

  • TOKEN = Your bot token from https://discord.com/developers/applications
  • MOD_ROLE = The name of the role you wish to allow to run join or close. NOTE: this is CaSe sensitive
  • GUILD_IDS = The ID of the server your bot is running in, I know it's a list, but it just needs to be an INT in the list (Bot only runs in 1 server at this moment in time

Replit Nix

Configuration

After that, you're good to begin configuration! To configure your bot, make a copy of config.json.example, and fill in the information there. To further configure your bot (optional) make a copy of albumart.json.example, and fill in the information with the supplied ones as a guide:

{
    "album_name":"Link to album art",
    "album_name":"Link to album art"
}

WHEN INVITING THE BOT Ensure the bot has both bot scopes AND all Privileged Gateway Intents

Edit main.py -

LINUX USERS:

You may need to edit main.py to fit your operating system's directories. (This may just be a case of swapping backslashes for forward slashes in certain cases)

Import your songs

To import your songs, it's simple! Put all your music into a folder called songs in the same directory as the program, and it'll automatically read them from there! (Please note, the "now playing" command reads from ID3 tags, so these will need to be filled out for that command to pull information. I suggest using mutagen for this)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

A Simple Discord.py Music Bot built to play local music files in Discord Stage Channels

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.3%
  • Nix 7.7%