From c222bef9a58775c34cd0f326fc3a7e63f37e5876 Mon Sep 17 00:00:00 2001 From: Ivin Joel Abraham Date: Wed, 16 Oct 2024 10:05:53 +0530 Subject: [PATCH] update README.md --- docs/README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index e4d31c8..2aec476 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1 +1,60 @@ -# amFOSS_daemon \ No newline at end of file +# amFOSS Daemon + +Discord bot used for the official amFOSS server for members. Built with [Serenity](https://www.github.com/serenity-rs/serenity) and [Poise](ttps://www.github.com/serenity-rs/poise). + + +## Feature Overview + +### Command Handling + +This bot uses `poise`, a command framework built on top of `serenity`. You can add commands in the `commands` module and get them registered using the `get_commands` function. + +```rust +// Example command in src/commands.rs +#[poise::command(prefix_command)] +async fn amdctl(ctx: Context<'_>) -> Result<(), Error> { + ctx.say("amD is up and running.").await?; + Ok(()) +} + +pub fn get_commands() -> Vec> { + vec![amdctl()] +} +``` + +### Reaction Roles + +amD supports automatic role assignment based on emoji reactions to specific messages. You can configure which messages and reactions trigger role assignemnt by modifying the `reaction_roles` Hashmap in the bot's `Data` struct. + +## Setup + +### Prerequisites + +- [Rust](https://www.rust-lang.org/tools/install) installed. +- A [Shuttle](https://www.shuttle.dev/) account and installation. +- A [Discord Bot Token](https://discord.com/developers/). + +### Configuration + +1. Clone the repository: +``` +git clone https://github.com/amfoss/amd.git +cd amd +``` + +2. Create a `Secrets.toml` with your Discord token in it. +``` +touch Secrets.toml +echo >> Secrets.toml +``` +3. Run the bot locally with `cargo shuttle run`. For instructions on how to deploy, refer [Shuttle docs](https://docs.shuttle.dev/getting-started/quick-start). + +## Contributing + +1. Fork the repository +2. Create your feature or fix branch (`git checkout -b feature/my-feature`). +3. Commit your changes and push to the branch. +4. Open your pull request to `main` or `develop`. + +## License +This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.