Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ivinjabraham committed Oct 16, 2024
1 parent 3ec1b48 commit c222bef
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
# amFOSS_daemon
# 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<poise::Command<Data, Error>> {
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 <YOUR TOKEN> >> 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.

0 comments on commit c222bef

Please sign in to comment.