turto is a simple and easy-to-use Discord music bot that supports customization. Through the following steps, you can have your own turto in minutes.
turto depends on FFmpeg and yt-dlp, make sure you have these tools installed, if you haven't done so, you can follow the following steps to install them.
It's recommanded to install FFmpeg using package manager like Scoop (my personal choice), Chocolatey or winget. Or you can also download it from their official site and manually add the executable to your system's PATH environment variable.
scoop install ffmpeg
choco install ffmpeg
winget install --id=Gyan.FFmpeg -e
Or, you can install Python and then use pip
to install yt-dlp
.
pip install yt-dlp
You can install FFmpeg on Linux using package manager. Depends on what distribution you are using, below are commands for some common package managers.
sudo apt-get install ffmpeg
sudo dnf install ffmpeg
sudo pacman -S ffmpeg
You can install FFmpeg on macOS using Homebrew package manager.
brew install ffmpeg
For installing yt-dlp, you can refer to this page on their github repository, they have made instructions for various platforms.
Since you ensure FFmpeg and yt-dlp are installed, you can download pre-compiled turto binaries from the release page. If the platform that you're using isn't provided, you can also compile it yourself.
After you extract the zip file downloaded from the release page, you will see .env
file, open it with text editor then you will see the content is like below.
DISCORD_TOKEN=
You need to paste you Token right after DISCORD_TOKEN=
, and save the file. If you don't know what is Token, you can just seach "discord bot token" and there are a lot of tutorials telling how to do. You also need to turn the MESSAGE CONTENT INTENT on, in the same page as you get Token.
In the same directory there is also config.toml
, it's configuration file for the bot. You can edit it with text editor, basically each attributes is just like what the comment said, just make sure you follow the TOML specification. The owner
attribute is optional, the bot can still work if you don't set it.
On Windows you can simply double click the turto.exe
file then the bot will start working, or you can also use Command Prompt or PowerShell.
.\turto
Make sure the exetuable have execute permission, if not, it can be done by
chmod +x turto
And you can start the bot by
./turto
You can get your application ID in Discord Developer Portal → Applications → Your bot's application → General Information, and replace {your application id}
in the URL below.
https://discord.com/api/oauth2/authorize?client_id={your application id}&permissions=36727808&scope=bot
Or, you can generate the URL in Discord Developer Portal → Applications → Your bot's application → OAuth2 → URL Generator. Make sure to select these following options.
Scopes
- bot
Bot permissions
- Read Messages/View Channels
- Send Messages
- Manage Messages
- Embed Links
- Connect
- Speak
- Use Voice Activity
In the directory where the bot executable is, there are two files help.toml
and template.toml
, you can customize almost every message that the bot will send in these two files, by just simply edit the file with text edtior. For more detail, you can refer to comments in the file.
Basically there's no need to edit these file, since I have written presets for you.
Basically you can get instructions of each command using the help
command, there are also some example included. Make sure to add the prefix (command_prefix
) you set in config.toml
before using commands.
To compile turto, you will need Rust toolchain and CMake.
To install Rust toolchain, you can visit here, and follow the instruction.
After you finish the installation, make sure your Rust version is higher than 1.70.0
, you can check your Rust version by
rustc -V
If you are using Scoop, Chocolatey or winget, you can install it with them. Or, you can also download the installer here.
scoop install cmake
choco install cmake
winget install --id=Kitware.CMake -e
You can install CMake on Linux using package manager. Depends on what distribution you are using, below are commands for some common package managers. Or, you can also download the installer here.
sudo apt-get install cmake
sudo dnf install cmake
sudo pacman -S cmake
You can install FFmpeg on macOS using Homebrew package manager. Or, you can also download the installer here.
brew install cmake
Since you ensure Rust toolchain and CMake are installed, you need to to clone this repository with Git. Or, you can directly download from github thorugh the release page or the Download ZIP.
git clone https://github.com/phoxwupsh/turto.git
Then you can head to the directory where Cargo.toml
is
cd turto
And start compiling
cargo build --release
After it compile successfully, you can see turto executable in directory target
→ release
. If you compile turto yourself, you will need .env
, config.toml
, help.toml
and templates.toml
in the same directory with the executable, you can find presets in this repository, with file name end with .template
, you can simply rename them and start using.