rustacean-roulette

Crates.iorustacean-roulette
lib.rsrustacean-roulette
version0.1.2
created_at2025-04-01 12:40:31.150695+00
updated_at2025-04-11 06:03:36.402104+00
descriptionA simple Russian Roulette Telegram bot implemented in Rust.
homepage
repositoryhttps://github.com/PRO-2684/rustacean-roulette
max_upload_size
id1614792
size79,042
PRO (PRO-2684)

documentation

README

rustacean-roulette

🦀 A simple Russian Roulette Telegram bot implemented in Rust.

Installation

Using binstall

cargo binstall rustacean-roulette

Downloading from Releases

Navigate to the Releases page and download respective binary for your platform. Make sure to give it execute permissions.

Compiling from Source

cargo install rustacean-roulette

Configuration

The configuration file is in TOML format, and it could be placed anywhere you want. An example configuration file is provided below:

token = "" # Telegram bot token, required

[game] # Game configuration, optional
chambers = 6 # Number of chambers in the revolver
bullets = 2 # Number of bullets in the revolver
jam_probability = 0.05 # Probability of the gun getting jammed
min_mute_time = 60 # Minimum mute time in seconds
max_mute_time = 600 # Maximum mute time in seconds

[[groups]] # Whitelisted groups and override configuration
id = 0 # Group ID, required
# Override configuration, identical to game configuration
chambers = 8 # In this group, the revolver has 8 chambers
bullets = 3 # In this group, the revolver has 3 bullets
# ...etc.

[[groups]] # Another group
id = 1 # Group ID, required
# ...Override configuration

# More groups...

Usage

rustacean-roulette /path/to/config.toml

Where /path/to/config.toml is the path to your configuration file. Defaults to ./config.toml if not specified.

TODO

  • Random bullets number
  • /help
Commit count: 35

cargo fmt