mirror of
https://github.com/arthur-pbty/shadowbot.git
synced 2026-06-11 15:57:10 +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,23 @@
|
||||
use crate::commands::moderation_tools;
|
||||
use serenity::model::prelude::*;
|
||||
use serenity::prelude::*;
|
||||
pub async fn handle_cmute(ctx: &Context, msg: &Message, args: &[&str]) {
|
||||
moderation_tools::handle_cmute(ctx, msg, args, false).await;
|
||||
}
|
||||
pub struct CmuteCommand;
|
||||
pub static COMMAND_DESCRIPTOR: CmuteCommand = CmuteCommand;
|
||||
impl crate::commands::command_contract::CommandSpec for CmuteCommand {
|
||||
fn metadata(&self) -> crate::commands::command_contract::CommandMetadata {
|
||||
crate::commands::command_contract::CommandMetadata {
|
||||
key: "cmute",
|
||||
command: "cmute",
|
||||
category: "admin",
|
||||
params: "<@membre/ID[,..]> [raison]",
|
||||
summary: "Mute salon",
|
||||
description: "Mute un membre sur le salon courant.",
|
||||
examples: &["+cmute @User"],
|
||||
alias_source_key: "cmute",
|
||||
default_aliases: &["cm"],
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user