feature/mod-convenience #6
|
|
@ -1,6 +1,8 @@
|
|||
use built::chrono;
|
||||
use manifold::error::{ManifoldError, ManifoldResult};
|
||||
use manifold::{ManifoldContext, ManifoldData};
|
||||
use poise::serenity_prelude as serenity;
|
||||
use crate::badgey::schema::custom_responses::response;
|
||||
|
||||
#[poise::command(slash_command, prefix_command, required_permissions = "MODERATE_MEMBERS")]
|
||||
async fn void_user(_ctx: ManifoldContext<'_>, _target: serenity::User) -> ManifoldResult<()> {
|
||||
|
|
@ -22,6 +24,18 @@ async fn record_chronicle(_ctx: ManifoldContext<'_>, _target: serenity::User) ->
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn commands() -> [poise::Command<ManifoldData, ManifoldError>; 4] {
|
||||
[void_user(), unvoid_user(), airlock_user(), record_chronicle()]
|
||||
#[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:** <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