spam reduction & config command

This commit is contained in:
2025-02-25 19:15:41 +01:00
parent 24e820e464
commit 2423e62c06
8 changed files with 53 additions and 10 deletions
+6 -1
View File
@@ -33,7 +33,7 @@ pub async fn stop(
let should_stop = ctx.data().args.dev
|| confirmation.unwrap_or_else(|| "".to_string()).to_lowercase() == "i want to stop the bot now";
let is_creator = ctx.author().id == UserId::new(ctx.data().byte_dice_id);
let is_creator = is_creator(ctx);
if should_stop && is_creator {
let msg = send_msg(ctx, "Saving data...".to_string(), true, true).await.unwrap();
@@ -58,6 +58,11 @@ pub async fn stop(
}
pub fn is_creator(ctx: Context<'_>) -> bool {
return ctx.author().id == UserId::new(ctx.data().byte_dice_id);
}
#[poise::command(
slash_command,
prefix_command,