diff options
| author | seth <[email protected]> | 2023-12-05 05:17:49 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-15 16:41:13 -0500 |
| commit | 815cb0df3b3e3f9dd2078b00f85754da87b1d55e (patch) | |
| tree | 85099483f8ebb0586bc097b65f6c5a2b5997150e /src/commands/moderation/actions.rs | |
| parent | 0ca61ddff6ec7404f0aeabc1c8c785bbc8db7fd5 (diff) | |
refactor: centralize storage handlers
Diffstat (limited to 'src/commands/moderation/actions.rs')
| -rw-r--r-- | src/commands/moderation/actions.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commands/moderation/actions.rs b/src/commands/moderation/actions.rs index 1050656..4d4d0f8 100644 --- a/src/commands/moderation/actions.rs +++ b/src/commands/moderation/actions.rs @@ -2,6 +2,7 @@ use crate::colors::Colors; use crate::Context; use color_eyre::eyre::{eyre, Result}; +use log::*; use poise::serenity_prelude::{CreateEmbed, User}; fn create_moderation_embed( @@ -23,7 +24,7 @@ fn create_moderation_embed( |e: &mut CreateEmbed| e.title(title).fields(fields).color(Colors::Red) } -// ban a user +/// ban a user #[poise::command( slash_command, prefix_command, @@ -42,6 +43,7 @@ pub async fn ban_user( let reason = reason.unwrap_or("n/a".to_string()); + debug!("Banning user {} with reason {reason}", user.id); if reason != "n/a" { guild.ban_with_reason(ctx, &user, days, &reason).await?; } else { @@ -55,7 +57,7 @@ pub async fn ban_user( Ok(()) } -// kick a user +/// kick a user #[poise::command( slash_command, prefix_command, @@ -68,6 +70,7 @@ pub async fn kick_user(ctx: Context<'_>, user: User, reason: Option<String>) -> let reason = reason.unwrap_or("n/a".to_string()); + debug!("Kicking user {} for reason {reason}", user.id); if reason != "n/a" { guild.kick_with_reason(ctx, &user, &reason).await?; } else { |
