Vocard is a simple custom Disocrd Music Bot built with Python & discord.py
Demo: Discord Bot Demo, Dashboard Demo
This bot can be deeply customised. You can change media buttons, player layout, player text and etc. |
|
docker-compose.yml
application.yml
settings.json
Put these files on your host machine.
Create /logs
folder with /supervisor
subfolder inside.
The end result should look like this:
### This folder will be your bot's configuration and log file directory.
/path/to/your/directory/
├── docker-compose.yml
├── application.yml
├── settings.json
└── logs/
└── supervisor/
Ensure the /logs/supervisor/ folder is created within your chosen directory.
Edit docker-compose.yml
and fill in the required environment values. These values are crucial for the bot to work.
If you're going to use the web-dashboard
, uncomment the ports directive for the vocard service and set the REDIRECT_URI
environment variable in the docker-compose.yml
file.
networks:
- vocardbot
## Uncomment if you're going to use web dashboard.
ports:
- 37123:37123
Values | Description |
---|---|
TOKEN | Your Discord bot token (Discord Portal) |
CLIENT_ID | Your Discord bot client id (Discord Portal) |
CLIENT_SECRET_ID | Your Discord bot client secret id (Discord Portal) (optional) |
SERCET_KEY | Secret key for dashboard (optional) |
BUG_REPORT_CHANNEL_ID | All the error messages will send to this text channel (optional) |
SPOTIFY_CLIENT_ID | Your Spoity client id (Spotify Portal) (optional) |
SPOTIFY_CLIENT_SECRET | Your Spoity client sercret id (Spotify Portal) (optional) |
GENIUS_TOKEN | Your genius api key (Genius Lyrics API) (optional) |
MONGODB_URL | Your Mongo datebase url (Mongodb) |
MONGODB_NAME | The datebase name that you created on Mongodb |
REDIRECT_URI | Redirect uri that you've specified on Discord Developer Portal (optional only for non-dashboard build) |
Stock values are good to go, but if you want to customize your Vocard here is settings.json
breakdown:
- For
nodes
you have to provide host, port, password and identifier of the Lavalink Server - For
prefix
you can set the prefix of the bot. (If you don't provide any prefix, the bot will disable the message command). - For
activity
you can set the activity of the bot. Example Here - For
bot_access_user
you can pass the discord user id. Example:[123456789012345678]
- For
embed_color
you must pass a Hexadecimal color code and add0x
before the color code. Example:"0xb3b3b3"
- For
default_max_queue
you can set a default maximum number of tracks that can be added to the queue. - For
lyrics_platform
you can set lyrics search engine (e.g.A_ZLyrics
,Genius
,lyrist
)
NOTE: If you are using Genius as your lyrics search engine, you must install the lyricsgenius module (pip install lyricsgenius
) - For
ipc_server
you can set the host, password and enable of the ipc server. - For
emoji_source_raw
you can change the source emoji of the track with discord emoji like<:EMOJI_NAME:EMOJI_ID>
- For
cooldowns
you can set a custom cooldown in the command. Example:"command_name": [The total number of tokens available, The length of the cooldown period in seconds]
- For
aliases
you can set custom aliases in the command. Example:"command_name": [alias1, alias2, ...]
- For
default_controller
you can set custom embeds and buttons in controller, Example Here - For
REDIRECT_URI
you have to set a callback URI to have access to your dashboard. Go to Discord Developer Portal, then choose your Application, then go to OAuth2 and in Redirects window enter your URI. It can be a domain name, or IP address.
IMPORTANT NOTE: Ensure the REDIRECT_URI
is identical in both the Discord Developer Portal and the docker-compose.yml
file.
Open a terminal or SSH session on your host machine.
Navigate to the directory where you saved the configuration files with docker-compose.yml
:
cd /path/to/your/directory/
Start the Docker containers in detached mode:
docker-compose up -d
Installation usually takes just a few minutes.
Here is an official Portainer guide on how to install container stack. You can either copy contents of your docker-compose.yml
and paste it to Portainer Web-editor or select a path to docker-compose.yml
on your PC.
- If you encounter issues related to the dashboard connection - ensure that ports specified in your
docker-compose.yml
are not in use by other services. - Check logs
- For Vocard logs, in your config directory check log files from
/logs/
folder. - For Lavalink logs, you can run the following command in the host SSH:
docker logs -f lavalink
.
- For Vocard logs, in your config directory check log files from
Note: Sometimes the Vocard container might start before its dependencies (like Lavalink). If this happens, manually restarting the Vocard container should resolve the issue.
docker-compose restart vocard
Re-check lavalink password and port in docker-compose.yml
, application.yml
and settings.json