This guide will walk you through setting up the necessary environment variables and configurations required for this project.
Before proceeding, ensure you have the following:
- A valid bot token
- A MongoDB database connection string
- API keys for weather and image commands
- Webhook URLs (if needed)
- Spotify API credentials
Create a .env
file in the root directory and add the following configurations:
# Bot Token [Required]
BOT_TOKEN=your_bot_token_here
# Mongo Database Connection String [Required]
MONGO_CONNECTION=your_mongo_connection_string_here
# Webhooks [Optional]
ERROR_LOGS=your_error_logs_webhook_here
JOIN_LEAVE_LOGS=your_join_leave_logs_webhook_here
# Dashboard [Required for dashboard]
BOT_SECRET=your_bot_secret_here
SESSION_PASSWORD=your_session_password_here
# Required for Weather Command (https://weatherstack.com)
WEATHERSTACK_KEY=your_weatherstack_api_key_here
# Required for Image Commands (https://strangeapi.hostz.me/dashboard)
STRANGE_API_KEY=your_strange_api_key_here
# Spotify [Required for Spotify Support] (https://developer.spotify.com)
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
-
Clone the repository:
git clone <repository_url> cd <repository_name>
-
Install dependencies:
npm install # or yarn install
-
Create and configure your
.env
file:- Copy the template above and fill in the required details.
-
Start the bot using
start.bat
:- Create a file named
start.bat
in the project root and add the following content:@echo off title Bot Startup echo Starting the bot... npm start pause
- Double-click
start.bat
to run the bot.
- Create a file named
Lavalink is required for music playback in the bot. You need to set up a Lavalink server or use a public one.
Instead of adding Lavalink credentials to .env
, configure them inside config.js
as follows:
module.exports = {
lavalink: {
host: 'your_lavalink_host_here',
port: your_lavalink_port_here,
password: 'your_lavalink_password_here'
}
};
Create or modify the application.yml
file inside the Lavalink directory with the following configuration:
server:
port: 2333
lavalink:
server:
password: "your_lavalink_password_here"
sources:
youtube: true
bandcamp: true
soundcloud: true
twitch: true
vimeo: true
http: true
local: false
bufferDurationMs: 400
frameBufferDurationMs: 5000
opusEncodingQuality: 10
resamplingQuality: HIGH
trackStuckThresholdMs: 10000
useSeekGhosting: true
youtubePlaylistLoadLimit: 6
playerUpdateInterval: 5
youtubeSearchEnabled: true
soundcloudSearchEnabled: true
metrics:
prometheus:
enabled: false
endpoint: /metrics
sentry:
dsn: ""
environment: "production"
logging:
file:
max-history: 30
max-size: 1GB
level:
root: INFO
After configuring application.yml
, start Lavalink using the following command:
java -jar Lavalink.jar
- Download Lavalink from Lavalink GitHub.
- Install Java (at least Java 11).
- Edit the
application.yml
file to configure your host, port, and password. - Run Lavalink using the following command:
java -jar Lavalink.jar
- Ensure your bot is correctly configured to connect to Lavalink.
- Bot Token: Discord Developer Portal
- MongoDB Connection String: MongoDB
- Weather API Key: WeatherStack
- Image API Key: StrangeAPI
- Spotify API Credentials: Spotify Developer
- If using webhooks, make sure to set up the appropriate URLs.
- Ensure all required API keys and credentials are correctly added.
- If you encounter issues, verify your environment variables and API credentials.
If you run into any issues, feel free to open an issue in the repository or contact support.
Join our Discord server for support: Discord Server If you run into any issues, feel free to open an issue in the repository or contact support.