This music bot for Discord is for all lovers of nightcore. This bot transforms all music to nightcore, anti nightcore or double speeded nightcore. This bot is for self hosting, this means you need a server or can simply run this bot on your pc.
First you need following software and libraries.
- CMake
- C++ compiler which supports C++11
- libDiscordBot
- youtube-dl
These instructions will help you compile and use the bot.
- Download and compile libDiscordBot.
- Cloning the repository
git clone --recurse-submodules -j8 --single-branch https://github.com/tostc/NightcoreBot.git
-
Copy the compiled library of libDiscordBot inside the
externals/libDiscordBot/lib
folder. -
Copy the header files of libDiscordBot inside the
externals/libDiscordBot/include
folder. -
Building the project:
cd NightcoreBot/ mkdir build cd build/ cmake ../ -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
or you can use the
cmake-gui
.For Linux execute following command inside the build directory
make install
For Windows open the *.sln file inside the build directory and build
BUILD_INSTALL
. -
Edit the
settings.json
inside the install directory and insert your Discord Bot token. If you don't know how to get this token please look here.Settings description:
Key Descirption token Your Discord token prefix Command prefix which indicates the start of a command ytdl Path to the youtube-dl cache Cache dir where all files from youtube-dl are stored. (Dir must exists) debug Prints debug messages of the bot log Log file directory. (Dir must exists) -
Copy the youtube-dl inside the executable directory.
-
Start the bot and invite the bot to your server.
Put the libDiscordBot library, the executable, the settings.json and the youtube-dl inside one directory and look at step 6. above.
Type !h
(where !
is your prefix) inside a text chat, where the bot has access to and you get following list.
!a - Plays a given song in anti-nightcore.
!d - Plays a given song in double-nightcore.
!h - Prints a help dialog
!help - Prints a help dialog
!join - Joins the voice channel of the user.
!leave - Leaves the voice channel.
!n - Skips the current song.
!np - Shows the current playing song.
!p - Plays a given song in nightcore.
!q - Shows the queue data.
The commands a
, d
and p
excepts one parameter seperated by a ' '. The parameter can either a link to youtube or a search word for youtube.
- Transforms any youtube video to nightcore in real time
- Supports nightcore (20% Speed for none nightcore music)
- Supports anti-nightcore(-15% Speed for none nightcore and -30% for nightcore)
- Supports double-nightcore(40% Speed for none nightcore and 20% for nightcore)
Following libraries will be downloaded automatically if you checkout the repo as described above.
This library is under the MIT License