A Discord bot for administering pick-up games & persistent user rating tracking based on match outcomes
MIT License
rs-pugbot
is a Discord bot built to administer custom matches in
gaming, and provide a ranked ladder for the Discord's members to compete on.
These are covered in detail in MILESTONES.md
.
stable
toolchain. This can be installed via rustup
:$ rustup toolchain install stable
You will need a database server up and running. I recommend PostgreSQL, and all documentation is written assuming PostgreSQL.
pugbot
user. What I did was this:CREATE ROLE pugbot SUPERUSER LOGIN PASSWORD 'password';
Install diesel_cli
. See here for more information, but the below should get you going:
cargo install diesel_cli --no-default-features --features postgres
.env
file. At the time of this writing (May '21), three key-value pairs are read from this file:
TEAM_COUNT
: How many teams there are in a given gameTEAM_SIZE
: How many players are on each teamDATABASE_URL
: Connection string to the database, ex. postgres://pugbot:password@localhost:5432/pugbot
DISCORD_TOKEN
: An OAuth2 token issued by Discord that the bot will use to connect to your server.I have found that, on Linux Mint (and Ubuntu etc. probably) you'll need to install the following:
sudo apt install -y postgresql libssl-dev libpq5 libpq-dev gcc-multilib
First, you'll need Rust's stable toolchain, installed via rustup
:
$ rustup toolchain install stable
Then, you will need a .env
file with DATABASE_URL
and TEAM_COUNT
attributes. Rename the file rename-this-to-.env
to .env
. (.env
is in .gitignore
so it won't be added to version control.)
Finally, run cargo test
.
Contributions from all skill levels welcome! I'm learning Rust as I go here so I welcome contributions from fellow newbs and salty experts alike. Please see the GitHub issues for open tasks.
Licensed under MIT license (LICENSE or https://opensource.org/licenses/MIT)