Discord bot used for the official amFOSS server for members. Built with Serenity and Poise.
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.
// 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()]
}
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.
Clone the repository:
git clone https://github.com/amfoss/amd.git
cd amd
Create a Secrets.toml
with your Discord token in it.
touch Secrets.toml
echo <YOUR TOKEN> >> Secrets.toml
Run the bot locally with cargo shuttle run
. For instructions on how to deploy, refer Shuttle docs.
git checkout -b feature/my-feature
).main
or develop
.This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.