diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 26f5e03..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod framework; -pub mod utils; -pub mod state; diff --git a/src/main.rs b/src/main.rs index 92db333..9c575e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,46 @@ +//! Payphone is a Discord bot that allows users to make calls to each other, similar to a phone +//! system. +//! +//! # Setting Up +//! +//! First of all, clone the Git repository and navigate to the project directory: +//! +//! ```shell +//! $ git clone --branch rewrite https://git.nyeki.dev/payphone/payphone.git +//! $ cd payphone +//! ``` +//! +//! To boot up Payphone, you'll need both a Discord bot token and a Scylla database cluster with +//! at least 3 nodes. +//! +//! - To get a Discord bot token, create a new bot application on the +//! [Discord Developer Portal](https://discord.com/developers/applications). +//! +//! - To set up a Scylla database cluster, make sure to have Docker and Docker Compose installed +//! and run `docker compose up -d`. A development cluster will be created with 3 nodes, with one +//! of them listening at `127.0.0.1:9042`. +//! +//! To stop the database cluster at any time, run `docker compose down`. To stop it and delete the +//! volumes (resetting the database), run `docker compose down -v`. +//! +//! # Booting Up +//! +//! Payphone has a CLI interface that allows you to pass the bot token and database URL as CLI +//! arguments. To get all possible arguments, run the following command: +//! +//! ```shell +//! $ cargo run -- --help +//! ``` +//! +//! Payphone also supports configuration via environment variables and `.env` files by default. +//! +//! ```env +//! PAYPHONE_TOKEN="your_discord_bot_token" +//! ``` +//! +//! All environment variables are prefixed with `PAYPHONE_` and can be used to override the CLI +//! arguments. + use clap::Parser; use twilight_gateway::Intents;