Skip to content

Discord bot created to give players information regarding the characters in Touhou 15.5

License

Notifications You must be signed in to change notification settings

JustAPenguin9/Akyuu-bot

Repository files navigation

Akyuu Bot

Akyuu is a discord bot created with Poise. The purpose of the bot is to give players information regarding the characters in the 15.5 installment of the Touhou series Touhou Hyouibana ~ Antinomy of Common Flowers developed by Twilight Frontier.

Running Akyuu

Clone the repository:

git clone https://github.com/JustAPenguin9/Akyuu-bot.git

If a database already exists that was used with JS Akyuu leave it as is because the initial migration transitions it to the new format.

If you are importing a mariadb-dump or mysql-dump name the file "dump.sql" and run ./import-sql-dump.sh before running Akyuu for the first time to set it up for the initial migration.

After a MariaDB or MySQL database is setup, either by itself or though a container, create a .env file and run Akyuu.

cargo run
# OR
podman compose up -d --build
# OR
docker compose up -d --build

Populating the moves table

After running the migrations (migrations are ran when Akyuu is ran) use ./import-character-sql.sh to to include all the moves in ./character-sql/* in the moves table.

Environment variables

In the .env file include:

DISCORD_TOKEN=[the token given to you through the discord developer portal]
COMMAND_PREFIX=[the prefix to all commands, by default it is "!"]

DB_PASSWORD=[password to the database]
DB_URL=[this will likely be "mariadb://akyuu:${DB_PASSWORD}@127.0.0.1:3306/akyuu_records"]

Running the database using containers

podman compose -f db.docker-compose.yaml up -d
# OR
docker compose -f db.docker-compose.yaml up -d

Migrations

Migrations are checked and ran when Akyuu is ran but they can also be manually applied and reverted using the sqlx cli eg.

DATABASE_URL=mariadb://akyuu:$PASSWORD@127.0.0.1:3306/akyuu_records 
cargo sqlx mig run
cargo sqlx prepare

Thanks to

@sonofgod_1998
@degaliuss
nimiala#8595
@cabadmdp
@elysiastarlight
@gato_rescatador
for contributing through Discord

Links

About

Discord bot created to give players information regarding the characters in Touhou 15.5

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •