- Play direct links and youtube text searches
- Queue youtube playlists from urls
- Loop individual tracks or the entire queue
- Automatic disconnection from voice channels during inactivity
- Display a list of the next queued tracks
- Discord.Net: Discord API
- Victoria: Lavalink client
- YamlDotNet: Yaml parsing
Melody uses Lavalink to play audio. Lavalink is a standalone java program that must be running for this bot to function.
- Sign in to the Discord Developer Portal and create an application and bot user.
- Copy the bot user's token into an environment variable named
DISCORD_TOKEN - Download and install the DotNet 5.0 runtime
- Download and run a Lavalink server, which the bot will connect to in order to play audio
- I recommend enabling IP rotation and request retrying in
application.ymlto avoid HTTP 403 errors and unexpected bot behavior
- I recommend enabling IP rotation and request retrying in
- Configure the bot to match the lavalink server's connection information (If changed from the default)
- Invite the bot by creating an OAuth2 url with the
botscope and some bot permissions, and copy/paste the link into your broswer. It will need permission to- Send messages
- Add reactions
- Connect to voice channels, speak in them, and deafen itself
- Send Embedded messages
- Run the bot and enjoy some music!
Some settings can be changed using a Yaml file named melody.yml in the working directory of the program. The configuration file allows you to change the accent color of embedded messages, set the command prefix, and set how long the bot waits before automatically leaving a voice channel when nothing is playing. This file is also where you specify Lavalink connection information.
Melody keeps of log of many of the actions it was asked to perform and some track events, primarily for debugging purposes. It outputs the log to the console and writes it to a file in the working directory named MelodyLog.txt.
The logs do not distinguish between actions performed for different servers, so if you encounter unexpected behavior please try to recreate it in a single server first and submit an issue with the log generated then.