Ensure you have the following before setup:
- Discord Token: Obtain from the Discord Developer Portal.
- Node.js: Version 20 or higher. Download here.
- NPM: Comes with Node.js.
- FFmpeg or Avconv: Required for media transcoding. Download FFmpeg or install via npm:
npm i ffmpeg-static
- DISCORD_TOKEN: Bot token for Discord API.
- CLIENT_ID: Bot application ID to register slash commands.
- DEV_GUILD: ID of the development server.
- DEV_IDS: Comma-separated list of developer IDs.
- Create
.env
File: In the root directory, create.env
. - Use
.env.sample
: Copy and replace placeholders with your values. - Save as
.env
: Ensure all variables are correctly filled.
- Clone the Repository:
git clone https://github.com/LakhindarPal/distube-music-bot && cd distube-music-bot
- Install Dependencies:
npm install
- Fill the
.env
File: Ensure all configurations are set as describe above. - Register Slash Commands:
npm run register
- Run the Bot:
npm start
- Fill the
.env
File: Ensure all configurations are set as described above. - Pull Docker Image:
docker pull lakhindarpal/distube-music-bot:latest
- Run Docker Container:
docker run --env-file .env lakhindarpal/distube-music-bot:latest
- Register Slash Commands:
docker exec -it <container_id> npm run register