musicbot
Table of Contents
๐ต Discord Music Bot โ Installation & Usage
This bot plays ambient lo-fi music automatically in your Discord voice channel. It starts with shuffle, continues playing without stopping, and can be controlled via simple commands.
๐ฆ Requirements
- Python 3.10 or newer
- FFmpeg installed (`sudo apt install ffmpeg`)
- A Discord Bot Token
- MP3 files placed in the `music/` directory
- Optional: systemd for autostart on boot
๐ ๏ธ Installation
- Clone or copy the bot code into a directory, e.g. `/var/www/mbot/`
- Create a `music/` folder and add your MP3 tracks
- Install required Python packages:
`pip install discord`
๐ Insert Your Bot Token
Open `.env` and replace:
`your-bot-token-here`
with your actual Discord bot token.
๐ค Creating a Discord Bot
- Click New Application, give it a name
- Go to Bot tab โ click Add Bot
- Under Privileged Gateway Intents, enable:
- Message Content Intent
- Server Members Intent
- Copy the token and paste it into `bot.py`
๐ Invite the Bot to Your Server
Go to the OAuth2 โ URL Generator tab:
- Scopes: `bot`
- Bot Permissions:
- Connect
- Speak
- Send Messages
- Read Message History
Copy the generated URL and open it in your browser to invite the bot.
๐ Bot
Now available on github!
musicbot.txt ยท Last modified: by miko