mirror of
https://github.com/arthur-pbty/shadowbot.git
synced 2026-06-06 22:43:48 +02:00
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:
@@ -0,0 +1,29 @@
|
||||
use crate::commands::logs_service;
|
||||
use serenity::model::prelude::*;
|
||||
use serenity::prelude::*;
|
||||
|
||||
pub async fn handle_join(ctx: &Context, msg: &Message, args: &[&str]) {
|
||||
logs_service::handle_join_leave_settings(ctx, msg, args, "join").await;
|
||||
}
|
||||
|
||||
pub struct JoinCommand;
|
||||
pub static COMMAND_DESCRIPTOR: JoinCommand = JoinCommand;
|
||||
|
||||
impl crate::commands::command_contract::CommandSpec for JoinCommand {
|
||||
fn metadata(&self) -> crate::commands::command_contract::CommandMetadata {
|
||||
crate::commands::command_contract::CommandMetadata {
|
||||
key: "join",
|
||||
command: "join",
|
||||
category: "admin",
|
||||
params: "settings [on/off] [salon] [message]",
|
||||
summary: "Parametre les actions de join",
|
||||
description: "Permet de configurer les actions quand un membre rejoint.",
|
||||
examples: &[
|
||||
"+join settings",
|
||||
"+join settings on #welcome Bienvenue {user}",
|
||||
],
|
||||
alias_source_key: "join",
|
||||
default_aliases: &["jset"],
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user