Discord bot with many features built for Riichi Mahjong servers.
The project is written in Rust and uses Cargo build system.
cargo build --releaseChombot requires some config values defined as environment variables. These are:
DISCORD_TOKEN- the Discord bot token. You can obtain one by creating a Discord app. Make sure to copy your Bot token, not a client secret.
Example:
export DISCORD_TOKEN=yourdiscordtoken
cargo run --bin chombot --releasePlease 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.
/create_channel creates a text channel in the current channel's category (or a chosen one), if both you and the bot could create it there. Its name suggestions come from the EMA calendar; picking a tournament names the channel like 🏆2026-02-kraków-hatsumi-taikai-2026 and sets the topic to Kraków :: 14-15 lutego 2026 :: https://....
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:
FEATURE_TOURNAMENTS_WATCHER-true, if you want to receive the notification about EMA tournament updates.TOURNAMENTS_WATCHER_CHANNEL_ID- ID of the channel used for notifications about EMA tournament updates.FEATURE_CHOMBOHALL_REMINDER-trueif you want to post a monthly reminder on the Tuesday before the third Wednesday of the month at 20:00 (Europe/Warsaw time).CHOMBOHALL_REMINDER_CHANNEL_ID- ID of the channel used for the monthly reminder.CHOMBOHALL_REMINDER_MESSAGE- content of the monthly reminder message.GUILD_ID- your guild ID.FEATURE_KCC3-trueif you want to enable the integration with kcc3.KCC3_URL- the URL of the kcc3 instance that you want to use with Chombot. The official instance ishttps://fanpai.chombo.club.KCC3_TOKEN- the API token for kcc3 that can be obtained via kcc3 admin page.FEATURE_PASTA-trueif you want to enable the/pastacommand (extremely hermetic!).FEATURE_CREATE_CHANNEL-trueif you want to enable/create_channel.
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_TOURNAMENTS_WATCHER=true
export TOURNAMENTS_WATCHER_CHANNEL_ID=98765
export FEATURE_CHOMBOHALL_REMINDER=true
export CHOMBOHALL_REMINDER_CHANNEL_ID=54321
export CHOMBOHALL_REMINDER_MESSAGE="Reminder: chombohall tomorrow at 20:00!"
export FEATURE_PASTA=true
export FEATURE_CREATE_CHANNEL=true
cargo run --bin chombot-kcc --releaseWe 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