From 3f5c8efd7a592bb5aa0adf931c66d8b12a00f7b0 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 12 Feb 2026 16:18:21 +0100 Subject: [PATCH] feat(events): adding mod.rs --- src/events/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/events/mod.rs diff --git a/src/events/mod.rs b/src/events/mod.rs new file mode 100644 index 0000000..233db65 --- /dev/null +++ b/src/events/mod.rs @@ -0,0 +1,20 @@ +include!("./mod_gen.rs"); + +use serenity::all::*; +use crate::commands::SlashCommand; + +pub struct Bot { + pub commands: Vec>, +} + +#[serenity::async_trait] +impl EventHandler for Bot { + + async fn ready(&self, ctx: Context, ready: Ready) { + bot::ready::handle(&ctx, &ready, &self.commands).await; + } + + async fn interaction_create(&self, ctx: Context, interaction: Interaction) { + bot::interaction_create::handle(&ctx, &interaction, &self.commands).await; + } +}