Compare commits
3 Commits
04552bb029
...
a97460d739
| Author | SHA1 | Date |
|---|---|---|
|
|
a97460d739 | |
|
|
a64f66cc7a | |
|
|
54bd863934 |
|
|
@ -1,3 +1,4 @@
|
||||||
|
use built::chrono;
|
||||||
use manifold::error::{ManifoldError, ManifoldResult};
|
use manifold::error::{ManifoldError, ManifoldResult};
|
||||||
use manifold::{ManifoldContext, ManifoldData};
|
use manifold::{ManifoldContext, ManifoldData};
|
||||||
use poise::serenity_prelude as serenity;
|
use poise::serenity_prelude as serenity;
|
||||||
|
|
@ -22,6 +23,18 @@ async fn record_chronicle(_ctx: ManifoldContext<'_>, _target: serenity::User) ->
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn commands() -> [poise::Command<ManifoldData, ManifoldError>; 4] {
|
#[poise::command(slash_command, prefix_command, required_permissions = "MODERATE_MEMBERS", aliases("sr", "sl"))]
|
||||||
[void_user(), unvoid_user(), airlock_user(), record_chronicle()]
|
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:** <t:{timestamp}:f>\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(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn commands() -> [poise::Command<ManifoldData, ManifoldError>; 5] {
|
||||||
|
[void_user(), unvoid_user(), airlock_user(), record_chronicle(), security_record()]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue