-
Notifications
You must be signed in to change notification settings - Fork 0
Installing and configuring the bot
-
Clone the Ultimate Tunes repository:
First, clone the bot's repository to your local machine:
git clone https://github.com/CPS7/Ultimate_Tunes.git
-
Change to the Ultimate Tunes directory:
Navigate to the project directory:
cd Ultimate_Tunes
-
Install the required packages:
Install all the necessary dependencies using npm:
npm install
-
Configure the Environment Variables:
Copy the
.env.example
file and rename it to.env
:cp .env.example .env
Open the
.env
file in a text editor and fill in the required values:-
TOKEN
: Your Discord bot token. -
MONGO_URI
: Your MongoDB connection string. -
CLIENT_ID
: Your bot's client ID. -
GUILD_ID
: (Optional) Your guild ID if you want to register slash commands only for a specific guild.
Example:
TOKEN=YOUR_BOT_TOKEN_HERE MONGO_URI=YOUR_MONGO_URI_HERE CLIENT_ID=YOUR_CLIENT_ID_HERE GUILD_ID=YOUR_GUILD_ID_HERE
-
-
Configure the Bot Settings:
Copy the
config.example.json
file and rename it toconfig.json
:cp config.example.json config.json
Open the
config.json
file in a text editor and fill in the required values:- clientId: Your bot's client ID.
-
prefix: The prefix for your bot commands (e.g.,
!
). - messages.COOLDOWN_MESSAGE: Customize the cooldown message for commands.
- ownerID: Your Discord user ID.
- adminId: The Discord user IDs of admins.
- uri: Your MongoDB connection string.
- nodes: Lavalink server details (host, identifier, password, port).
Example:
{ "clientId": "YOUR_CLIENT_ID_HERE", "prefix": "!", "messages": { "COOLDOWN_MESSAGE": "You are on <duration> cooldown!" }, "ownerID": ["YOUR_USER_ID_HERE"], "adminId": ["ADMIN_USER_ID_HERE"], "uri": "YOUR_MONGO_URI_HERE", "alwaysOnlineReplit": true, "nodes": [ { "host": "YOUR_LAVALINK_HOST_HERE", "identifier": "YOUR_LAVALINK_IDENTIFIER_HERE", "password": "YOUR_LAVALINK_PASSWORD_HERE", "port": 2333, "retryAmount": 1000, "retrydelay": 10000, "resumeStatus": true, "resumeTimeout": 1000, "secure": false } ] }
-
Run the Bot:
With everything configured, you can now start your bot:
npm start
-
Invite the Bot to Your Server:
Generate an invite link for your bot from the Discord Developer Portal or use the Permissions Calculator to select the necessary permissions and invite the bot to your server.
-
OAuth2 URL Generator: Select
bot
andapplications.commands
scopes, then choose the required permissions for your bot.
-
OAuth2 URL Generator: Select
-
Test the Bot:
After inviting the bot to your server, test it by using the commands you configured. Ensure MongoDB integration, Lavalink music playback, and other features work as expected.
This comprehensive guide should help you get your bot up and running with all the necessary configurations!
-
- Introduction and Overview
- Features and Capabilities
-
Installing and Configuring the Bot
- Prerequisites
- Installation Steps
- Configuration Guide
-
.env
Configuration -
config.json
Configuration
-
-
- Setting Up MongoDB
- Connecting MongoDB via Driver URL
- Configuring MongoDB in Your Bot
-
- Downloading and Setting Up Lavalink
- Configuring Lavalink in Your Bot
- Connecting the Bot to Lavalink
- Troubleshooting Lavalink Connections
-
- Common Issues and Solutions
- How to Enable Message Content Intent
- Bot Permissions and Command Issues
- Music Playback and Node Configuration
- Admin Management and Token Changes