Skip to content

Configuration

Note

Lavalink is essential for processing and streaming audio to Discord. Without a Lavalink server, you won't be able to play music on Vocard. You can either host your own server or use a public Lavalink server from this Public Lavalink Website.

Required Plugins

To use Vocard with YouTube and other audio sources, configure your Lavalink server to include the YouTube Source and LavaSrc plugins. Add the following to your application.yml file under the lavalink.plugins section:

lavalink:
  plugins:
    - dependency: "dev.lavalink.youtube:youtube-plugin:1.18.1"  # Check latest version at https://github.com/lavalink-devs/youtube-source/releases
      snapshot: false
    - dependency: "com.github.topi314.lavasrc:lavasrc-plugin:4.8.0"  # Check latest version at https://github.com/topi314/LavaSrc/releases
      snapshot: false
For a complete and pre-configured application.yml template, refer to the example provided in the Vocard repository.

Settings up settings.json

Rename settings Example.json to settings.json and customize your settings.

Note

If you are using Genius as your lyrics search engine, you must install the lyricsgenius module (pip install lyricsgenius)

settings.json
{
    "token": "YOUR_BOT_TOKEN", # (1)
    "client_id": "YOUR_BOT_CLIENT_ID", # (2)
    "genius_token": "YOUR_GENIUS_TOKEN", # (4)
    "mongodb_url": "YOUR_MONGODB_URL", # (5)
    "mongodb_name": "YOUR_MONGODB_DB_NAME",
    "nodes": { # (6)
        "DEFAULT": {
            "host": "lavalink",
            "port": 2333,
            "password": "youshallnotpass",
            "secure": false,
            "identifier": "DEFAULT",
            "yt_ratelimit": {
                "tokens": [],
                "config": {
                    "retry_time": 10800,
                    "max_requests": 30
                },
                "strategy": "LoadBalance"
            }
        }   
    },
    "prefix": "?", # (7)
    "activity": [ # (8)
        {"type": "listening", "name": "/help", "status": "online"}
    ],
    "logging": { # (9)
        "file": {
            "path": "./logs",
            "enable": true
        },
        "level": {
            "discord": "INFO",
            "vocard": "INFO",
            "ipc_client": "INFO"
        },
        "max-history": 30
    },
    "bot_access_user": [], # (10)
    "embed_color":"0xb3b3b3", # (11)
    "default_max_queue": 1000, # (12)
    "lyrics_platform": "lyrist", # (13)
    "ipc_client": { # (14)
        "host": "127.0.0.1",
        "port": 8000,
        "password": "YOUR_PASSWORD",
        "secure": false,
        "enable": false
    },
    "timer_settings": { # (15)
        "bot_activity_update": 600,
        "inactive_player_cleanup": 600,
        "cache_cleanup": 43200
    },
    "playlist_settings": { # (16)
        "max_playlists": 5,
        "max_tracks_per_playlist": 500,
        "default_playlist_name": "Favourite"
    },
    "sources_settings": { # (17)
        "youtube": {
            "emoji": "<:youtube:826661982760992778>",
            "color": "0xFF0000"
        },
        "youtubemusic": {
            "emoji": "<:youtube:826661982760992778>",
            "color": "0xFF0000"
        },
        "spotify": {
            "emoji": "<:spotify:826661996615172146>",
            "color": "0x1DB954"
        },
        "soundcloud": {
            "emoji": "<:soundcloud:852729280027033632>",
            "color": "0xFF7700"
        },
        "twitch": {
            "emoji": "<:twitch:852729278285086741>",
            "color": "0x9B4AFF"
        },
        "bandcamp": {
            "emoji": "<:bandcamp:864694003811221526>",
            "color": "0x6F98A7"
        },
        "vimeo": {
            "emoji": "<:vimeo:864694001919721473>",
            "color": "0x1ABCEA"
        },
        "applemusic": {
            "emoji": "<:applemusic:994844332374884413>",
            "color": "0xE298C4"
        },
        "reddit": {
            "emoji": "<:reddit:996007566863773717>",
            "color": "0xFF5700"
        },
        "tiktok": {
            "emoji": "<:tiktok:996007689798811698>",
            "color": "0x74ECE9"
        },
        "others": {
            "emoji": "🔗",
            "color": "0xb3b3b3"
        }
    },
    "default_controller": { # (18)
        "embeds": {
            "active": {
                "description": "**Now Playing: ```[@@track_name@@]```\nLink: [Click Me](@@track_url@@) | Requester: @@track_requester_mention@@ | DJ: @@dj@@**",
                "footer": {
                    "text": "Queue Length: @@queue_length@@ | Duration: @@track_duration@@ | Volume: @@volume@@% {{loop_mode != 'Off' ?? | Repeat: @@loop_mode@@}}"
                },
                "image": "@@track_thumbnail@@",
                "author": {
                    "name": "Music Controller | @@channel_name@@",
                    "icon_url": "@@bot_icon@@"
                },
                "color": "@@track_color@@"
            },
            "inactive": {
                "title": {
                    "name": "There are no songs playing right now"
                },
                "description": "[Support](@@server_invite_link@@) | [Invite](@@invite_link@@) | [Questionnaire](https://forms.gle/Qm8vjBfg2kp13YGD7)",
                "image": "https://i.imgur.com/dIFBwU7.png",
                "color": "@@default_embed_color@@"
            }
        },
        "buttons": [ # (19)
            {
                "back": {
                    "emoji": "⏮️",
                    "label": "@@t_player.buttons.back@@"
                },
                "play-pause": {
                    "states": {
                        "pause": {
                            "emoji": "⏸️",
                            "label": "@@t_player.buttons.pause@@"
                        },
                        "resume": {
                            "emoji": "▶️",
                            "label": "@@t_player.buttons.resume@@"
                        }
                    }
                },
                "skip": {
                    "emoji": "⏭️",
                    "label": "@@t_player.buttons.skip@@"
                },
                "stop": {
                    "emoji": "⏹️",
                    "label": "@@t_player.buttons.leave@@",
                    "style": "red"
                },
                "add-fav": {
                    "emoji": "❤️",
                    "label": ""
                }
            },
            {
                "tracks": {
                    "label": "@@t_player.dropdown.trackSelect@@",
                    "max_options": 10
                }
            }
        ]
    },
    "default_voice_status_template": "{{@@track_name@@ != 'None' ?? @@track_source_emoji@@ Now Playing: @@track_name@@ // Waiting for song requests}}", # (20)
    "cooldowns": { # (21)
        "connect": [2, 30],
        "playlist view": [1, 30]
    },
    "aliases": { # (22)
        "connect": ["join"],
        "leave": ["stop", "bye"],
        "play": ["p"],
        "view": ["v"]
    }
}
  1. Your Discord bot token. You can get it on Discord Portal
  2. (Optional) Your Discord bot client ID. You can get it on Discord Portal
  3. Your Spoity client ID and client secret ID. You can get it on Spotify Portal
  4. Your genius api token. You can get it on Genius Lyrics API
  5. Your Mongo datebase url and name. You can create MongoDB on MongoDB
  6. Lavalink Server that Vocard will connected! You have to provide host, port, password and identifier of the server.
  7. You can set the prefix of the bot. If you don't provide any prefix, the bot will disable the message command.
  8. You can set the activity status of the bot. You can look at some example here.
  9. You can configure the logging settings, including the log file path, the logging level for each library, and the maximum history duration for the logs in days.
  10. By providing the Discord user ID, you can grant these users access to all administrative commands. This will allow them to bypass any limitations imposed on the commands. Example: [123456789012345678, 876543210987654321, ...]
  11. You must pass a Hexadecimal color code and add 0x before the color code. Example: 0xb3b3b3
  12. You can set a default maximum number of tracks that can be added to the queue.
  13. You can set lyrics search engine. (e.g. A_ZLyrics, Genius, Lyrist, Lrclib, Musixmatch)
  14. You can configure the host, password, and enable the IPC client to connect to your Vocard dashboard.
  15. You can configure the timer settings to manage activity updates, player cleanup, and cache cleanup intervals, ensuring efficient operation.
  16. You can also set limits for playlists, including the maximum number of playlists, tracks per playlist, and a default name for new playlists.
  17. You can change the source emoji of the track with discord emoji like <:EMOJI_NAME:EMOJI_ID> and change the color of the source in Hexadecimal color.
  18. You can create your custom embeds and buttons in the player controller. Example Here
  19. You can create your custom buttons in the player controller. Example Here
  20. You can set a default voice channel status template while music is playing. Explore available placeholders here.
  21. You can set a custom cooldown for the command. Example: "command_name": [The total number of tokens available, The length of the cooldown period in seconds]
  22. You can set custom aliases in the command. Example: "command_name": [alias1, alias2, ...]
settings.json
{
    "token": "YOUR_BOT_TOKEN", # (1)
    "client_id": "YOUR_BOT_CLIENT_ID", # (2)
    "genius_token": "YOUR_GENIUS_TOKEN", # (4)
    "mongodb_url": "YOUR_MONGODB_URL", # (5)
    "mongodb_name": "YOUR_MONGODB_DB_NAME",
    "nodes": { # (6)
        "DEFAULT": {
            "host": "lavalink",
            "port": 2333,
            "password": "youshallnotpass",
            "secure": false,
            "identifier": "DEFAULT",
            "yt_ratelimit": {
                "tokens": [],
                "config": {
                    "retry_time": 10800,
                    "max_requests": 30
                },
                "strategy": "LoadBalance"
            }
        }   
    },
    "prefix": "?", # (7)
    "activity": [ # (8)
        {"type": "listening", "name": "/help", "status": "online"}
    ],
    "logging": { # (9)
        "file": {
            "path": "./logs",
            "enable": true
        },
        "level": {
            "discord": "INFO",
            "vocard": "INFO",
            "ipc_client": "INFO"
        },
        "max-history": 30
    },
    "bot_access_user": [], # (10)
    "embed_color":"0xb3b3b3", # (11)
    "default_max_queue": 1000, # (12)
    "lyrics_platform": "lyrist", # (13)
    "ipc_client": { # (14)
        "host": "127.0.0.1",
        "port": 8000,
        "password": "YOUR_PASSWORD",
        "secure": false,
        "enable": false
    },
    "sources_settings": { # (15)
        "youtube": {
            "emoji": "<:youtube:826661982760992778>",
            "color": "0xFF0000"
        },
        "youtubemusic": {
            "emoji": "<:youtube:826661982760992778>",
            "color": "0xFF0000"
        },
        "spotify": {
            "emoji": "<:spotify:826661996615172146>",
            "color": "0x1DB954"
        },
        "soundcloud": {
            "emoji": "<:soundcloud:852729280027033632>",
            "color": "0xFF7700"
        },
        "twitch": {
            "emoji": "<:twitch:852729278285086741>",
            "color": "0x9B4AFF"
        },
        "bandcamp": {
            "emoji": "<:bandcamp:864694003811221526>",
            "color": "0x6F98A7"
        },
        "vimeo": {
            "emoji": "<:vimeo:864694001919721473>",
            "color": "0x1ABCEA"
        },
        "applemusic": {
            "emoji": "<:applemusic:994844332374884413>",
            "color": "0xE298C4"
        },
        "reddit": {
            "emoji": "<:reddit:996007566863773717>",
            "color": "0xFF5700"
        },
        "tiktok": {
            "emoji": "<:tiktok:996007689798811698>",
            "color": "0x74ECE9"
        },
        "others": {
            "emoji": "🔗",
            "color": "0xb3b3b3"
        }
    },
    "default_controller": { # (16)
        "embeds": {
            "active": {
                "description": "**Now Playing: ```[@@track_name@@]```\nLink: [Click Me](@@track_url@@) | Requester: @@track_requester_mention@@ | DJ: @@dj@@**",
                "footer": {
                    "text": "Queue Length: @@queue_length@@ | Duration: @@track_duration@@ | Volume: @@volume@@% {{loop_mode != 'Off' ?? | Repeat: @@loop_mode@@}}"
                },
                "image": "@@track_thumbnail@@",
                "author": {
                    "name": "Music Controller | @@channel_name@@",
                    "icon_url": "@@bot_icon@@"
                },
                "color": "@@track_color@@"
            },
            "inactive": {
                "title": {
                    "name": "There are no songs playing right now"
                },
                "description": "[Support](@@server_invite_link@@) | [Invite](@@invite_link@@) | [Questionnaire](https://forms.gle/Qm8vjBfg2kp13YGD7)",
                "image": "https://i.imgur.com/dIFBwU7.png",
                "color": "@@default_embed_color@@"
            }
        },
        "buttons": [ # (17)
            {
                "back": {
                    "emoji": "⏮️",
                    "label": "@@t_buttonBack@@"
                },
                "play-pause": {
                    "states": {
                        "pause": {
                            "emoji": "⏸️",
                            "label": "@@t_buttonPause@@"
                        },
                        "resume": {
                            "emoji": "▶️",
                            "label": "@@t_buttonResume@@"
                        }
                    }
                },
                "skip": {
                    "emoji": "⏭️",
                    "label": "@@t_buttonSkip@@"
                },
                "stop": {
                    "emoji": "⏹️",
                    "label": "@@t_buttonLeave@@",
                    "style": "red"
                },
                "add-fav": {
                    "emoji": "❤️",
                    "label": ""
                }
            },
            {
                "tracks": {
                    "label": "@@t_playerDropdown@@",
                    "max_options": 10
                }
            }
        ]
    },
    "default_voice_status_template": "{{@@track_name@@ != 'None' ?? @@track_source_emoji@@ Now Playing: @@track_name@@ // Waiting for song requests}}", # (18)
    "cooldowns": { # (19)
        "connect": [2, 30],
        "playlist view": [1, 30]
    },
    "aliases": { # (20)
        "connect": ["join"],
        "leave": ["stop", "bye"],
        "play": ["p"],
        "view": ["v"]
    }
}
  1. Your Discord bot token. You can get it on Discord Portal
  2. (Optional) Your Discord bot client ID. You can get it on Discord Portal
  3. Your Spoity client ID and client secret ID. You can get it on Spotify Portal
  4. Your genius api token. You can get it on Genius Lyrics API
  5. Your Mongo datebase url and name. You can create MongoDB on MongoDB
  6. Lavalink Server that Vocard will connected! You have to provide host, port, password and identifier of the server.
  7. You can set the prefix of the bot. If you don't provide any prefix, the bot will disable the message command.
  8. You can set the activity status of the bot. You can look at some example here.
  9. You can configure the logging settings, including the log file path, the logging level for each library, and the maximum history duration for the logs in days.
  10. By providing the Discord user ID, you can grant these users access to all administrative commands. This will allow them to bypass any limitations imposed on the commands. Example: [123456789012345678, 876543210987654321, ...]
  11. You must pass a Hexadecimal color code and add 0x before the color code. Example: 0xb3b3b3
  12. You can set a default maximum number of tracks that can be added to the queue.
  13. You can set lyrics search engine. (e.g. A_ZLyrics, Genius, Lyrist, Lrclib, Musixmatch)
  14. You can configure the host, password, and enable the IPC client to connect to your Vocard dashboard.
  15. You can change the source emoji of the track with discord emoji like <:EMOJI_NAME:EMOJI_ID> and change the color of the source in Hexadecimal color.
  16. You can create your custom embeds and buttons in the player controller. Example Here
  17. You can create your custom buttons in the player controller. Example Here
  18. You can set a default voice channel status template while music is playing. Explore available placeholders here.
  19. You can set a custom cooldown for the command. Example: "command_name": [The total number of tokens available, The length of the cooldown period in seconds]
  20. You can set custom aliases in the command. Example: "command_name": [alias1, alias2, ...]