diff --git a/src/badgey/commands/moderation.rs b/src/badgey/commands/moderation.rs index 75f359c..f0e28c5 100644 --- a/src/badgey/commands/moderation.rs +++ b/src/badgey/commands/moderation.rs @@ -1,7 +1,6 @@ use manifold::error::{ManifoldError, ManifoldResult}; use manifold::{ManifoldContext, ManifoldData}; use poise::serenity_prelude as serenity; -use crate::badgey::models::quarantine_channel::QuarantineChannel; #[poise::command(slash_command, prefix_command, required_permissions = "MODERATE_MEMBERS")] async fn void_user(_ctx: ManifoldContext<'_>, _target: serenity::User) -> ManifoldResult<()> { @@ -23,6 +22,18 @@ async fn record_chronicle(_ctx: ManifoldContext<'_>, _target: serenity::User) -> Ok(()) } +#[poise::command(slash_command, prefix_command, required_permissions = "MODERATE_MEMBERS", aliases("sr", "sl"))] +async fn security_record(ctx: ManifoldContext<'_>) -> ManifoldResult<()> { + + let author = ctx.author().id; + let timestamp = chrono::Utc::now().timestamp(); + let response_body = format!("```**__Server Security Report__**\n\n**Date:** \n**Moderator(s):** <@{author}>\n**Offending User(s):**\n\n**Description:**\n\n**Actions Taken:**```", timestamp = timestamp, author = author); + + ctx.reply(response_body).await?; + + Ok(()) +} + #[poise::command(slash_command, prefix_command, required_permissions = "MANAGE_GUILD")] async fn add_quarantine_channel(ctx: ManifoldContext<'_>, channel: serenity::ChannelId, role: serenity::RoleId) -> ManifoldResult<()> { let qc = QuarantineChannel::new(role.as_u64().clone() as i64, channel.as_u64().clone() as i64); @@ -42,6 +53,6 @@ async fn remove_quarantine_channel(ctx: ManifoldContext<'_>, channel: serenity:: Ok(()) } -pub fn commands() -> [poise::Command; 6] { - [void_user(), unvoid_user(), airlock_user(), record_chronicle(), add_quarantine_channel(), remove_quarantine_channel()] +pub fn commands() -> [poise::Command; 7] { + [void_user(), unvoid_user(), airlock_user(), record_chronicle(), security_record(), add_quarantine_channel(), remove_quarantine_channel()] }