Asuka-bot is a free bot for Discord that was created using Rust. I made this bot for my friend's Discord server, but it might be useful for anyone else. This bot is focused on privacy as you have complete control over the code.
help-> Lists all commands.animedex-> Enter the anime you want to know more about.yugi-> Enter the card's name to get the most relevant info.felizjueves-> This command wish you a happy Thursday (obviously it only works on Thursdays).poll-> Make a poll where people can vote.
The configuration file is contained within the Settings.toml file.
prefix: Prefix for commands.activity: Define an activity for the bot.timezone: Time zone for the felizjueves command.debug: The most important events of the bot should be logged into the console and in a file, for troubleshooting purposes. To start the log, enter1and0to stop it.
Example
[settings]
prefix = '$'
activity = "Napping..."
timezone = "America/New_York"
debug = 0
If the file does not exist, it will be generated automatically.
When you launch the bot for the first time, it will prompt you to enter the token generated from the Discord developer portal. After you’ve entered the token, it will be saved in a hidden and encrypted file that cannot be viewed or edited by anyone. The encryption algorithm used is AES-256-GCM.
First, make sure you have BuildKit activated.
export DOCKER_BUILDKIT=1
Create a .txt file in the project's root directory. This file will store the token used by the Docker container for the bot.
$ echo "<YOUR_TOKEN>" > token.txt
Then run the following Docker command.
$ docker compose up -d
This is for setting up a ready-to-use container with the bot. Alternatively, you can run the bot as an executable without needing to create a .txt file.
You can run the container manually without using Docker Compose by following these steps:
Again, make sure you have BuildKit activated.
export DOCKER_BUILDKIT=1
Create a .txt file in the project's root directory.
$ echo "<YOUR_TOKEN>" > token.txt
Build the Docker image, use the --secret flag to securely pass the token during build:
$ docker build --secret id=discord_token,src=token.txt -t asuka-bot .
Launch the container using the image you just built.
$ docker run asuka-bot
