Files
shadowbot/src/commands/clear_messages.rs
T
Puechberty Arthur 3e69185296 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`.
2026-04-10 02:13:04 +02:00

28 lines
1.0 KiB
Rust

use serenity::model::prelude::*;
use serenity::prelude::*;
use crate::commands::moderation_tools;
pub async fn handle_clear_messages(ctx: &Context, msg: &Message, args: &[&str]) {
moderation_tools::handle_clear_messages(ctx, msg, args).await;
}
pub struct ClearMessagesCommand;
pub static COMMAND_DESCRIPTOR: ClearMessagesCommand = ClearMessagesCommand;
impl crate::commands::command_contract::CommandSpec for ClearMessagesCommand {
fn metadata(&self) -> crate::commands::command_contract::CommandMetadata {
crate::commands::command_contract::CommandMetadata {
key: "clear_messages",
command: "clear",
category: "admin",
params: "<nombre> [@membre/ID]",
summary: "Supprime des messages dans le salon",
description: "Supprime un nombre de messages, optionnellement filtres par membre.",
examples: &["+clear 20", "+clear 20 @User"],
alias_source_key: "clear_messages",
default_aliases: &["purge"],
}
}
}