feat: implement dice rolling

This commit is contained in:
2025-09-02 16:12:27 +02:00
parent 9c6249ca41
commit 34a25641d6
11 changed files with 288 additions and 79 deletions

View File

@@ -2,7 +2,8 @@ use color_eyre::eyre::{Error, Result};
use poise::serenity_prelude::{self as serenity, FullEvent};
use tracing::info;
mod roll;
mod roll_dice;
mod source;
type Context<'a> = poise::Context<'a, (), Error>;
@@ -17,7 +18,7 @@ pub async fn make_bot() -> Result<serenity::Client> {
let intents = serenity::GatewayIntents::non_privileged();
let framework = poise::Framework::<(), Error>::builder()
.options(poise::FrameworkOptions {
commands: vec![roll::roll()],
commands: vec![roll_dice::roll(), source::source()],
event_handler: |ctx, event, _framework: poise::FrameworkContext<'_, (), _>, _data| {
Box::pin(async move {
event_handler(ctx.clone(), event);