riichi / chombot

Discord bot for Riichi Mahjong servers
MIT License
5 stars 0 forks source link
discord discord-bot mahjong riichi

chombot

Rust Build Status Docker Build Status MIT licensed codecov

Discord bot with many features built for Riichi Mahjong servers.

Building

The project is written in Rust and uses Cargo build system.

cargo build --release

Running

Chombot requires some config values defined as environment variables. These are:

Example:

export DISCORD_TOKEN=yourdiscordtoken
cargo run --bin chombot --release

Please note that the working directory serves as a persistence storage for the bot's state, so the bot process must have write permissions for it.

chombot-kcc

In addition to the base version of Chombot, there is also an enhanced version called Chombot-kcc available. This is version tailored for the needs of Krakow Chombo Club and contains a few additional (possibly hermetic) features.

Chombot-kcc requires more config values defined as environment variables. Those are:

Example:

export DISCORD_TOKEN=yourdiscordtoken
export GUILD_ID=12345
export FEATURE_KCC3=true
export KCC3_URL=https://fanpai.chombo.club
export KCC3_TOKEN=yourkcc3token
export FEATURE_RANKING_WATCHER=true
export RANKING_WATCHER_CHANNEL_ID=54321
export FEATURE_TOURNAMENTS_WATCHER=true
export TOURNAMENTS_WATCHER_CHANNEL_ID=98765
export FEATURE_PASTA=true
cargo run --bin chombot-kcc --release

Developing

pre-commit

We encourage contributors to use predefined pre-commit hooks --- to install them in your local repo, make sure you have pre-commit installed and run

pre-commit install