feat(events): add message update, role, and voice state update handlers

- Implemented `handle_message_update` to log message edits.
- Created role event handlers for role creation, update, and deletion.
- Added voice state update handling to log channel changes.
- Introduced a new `ready_event` handler to restore bot presence and enforce blacklist.
- Updated `mod.rs` to include new event modules.
- Enhanced `main.rs` for database connection and initialization.
- Added comprehensive permission management in `permissions.rs`.
This commit is contained in:
Puechberty Arthur
2026-04-10 02:13:04 +02:00
commit 3e69185296
169 changed files with 23909 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
use serenity::model::prelude::*;
use serenity::prelude::*;
use crate::commands::{advanced_tools, help, mp, perms_service, suggestion, tempvoc, ticket};
pub async fn handle_interaction_create(ctx: &Context, interaction: &Interaction) {
if let Interaction::Command(_) = interaction {
if help::handle_slash_interaction(ctx, interaction).await {
return;
}
}
if let Interaction::Component(component) = interaction {
if ticket::handle_component_interaction(ctx, component).await {
return;
}
if suggestion::handle_component_interaction(ctx, component).await {
return;
}
if tempvoc::handle_component_interaction(ctx, component).await {
return;
}
if help::handle_help_component(ctx, component).await {
return;
}
if mp::handle_mp_component(ctx, component).await {
return;
}
if perms_service::handle_allperms_component(ctx, component).await {
return;
}
let _ = advanced_tools::handle_component_interaction(ctx, component).await;
return;
}
if let Interaction::Modal(modal) = interaction {
if ticket::handle_modal_interaction(ctx, modal).await {
return;
}
if suggestion::handle_modal_interaction(ctx, modal).await {
return;
}
if tempvoc::handle_modal_interaction(ctx, modal).await {
return;
}
let _ = advanced_tools::handle_modal_interaction(ctx, modal).await;
}
}