https://github.com/alexdaz/asuka-bot
A Discord bot written in Rust.
https://github.com/alexdaz/asuka-bot
discord discord-bot rust rust-lang serenity-rs
Last synced: about 1 month ago
JSON representation
A Discord bot written in Rust.
- Host: GitHub
- URL: https://github.com/alexdaz/asuka-bot
- Owner: Alexdaz
- License: mit
- Created: 2024-11-13T04:30:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-13T04:43:46.000Z (over 1 year ago)
- Last Synced: 2025-03-03T22:09:01.210Z (over 1 year ago)
- Topics: discord, discord-bot, rust, rust-lang, serenity-rs
- Language: Rust
- Homepage:
- Size: 1.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

### 💗 Asuka-bot
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.
### 🕹️ Commands
- `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.
### ⚙️ Config File
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, enter `1` and `0` to stop it.
Example
```
[settings]
prefix = '$'
activity = "Napping..."
timezone = "America/New_York"
debug = 0
```
If the file does not exist, it will be generated automatically.
### 🔒 Token
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.
### 🐋 Deployment
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 "" > 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.
#### Option 2: Running Without Docker Compose
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 "" > 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
```