From 130504b96490dadbe909b326516c3169b6d1c1c8 Mon Sep 17 00:00:00 2001 From: jude Date: Mon, 26 Sep 2022 16:44:30 +0100 Subject: [PATCH] Add notice to macro initial run --- src/commands/command_macro/run.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/commands/command_macro/run.rs b/src/commands/command_macro/run.rs index 2517227..e212f63 100644 --- a/src/commands/command_macro/run.rs +++ b/src/commands/command_macro/run.rs @@ -1,5 +1,5 @@ use super::super::autocomplete::macro_name_autocomplete; -use crate::{models::command_macro::guild_command_macro, Context, Data, Error}; +use crate::{models::command_macro::guild_command_macro, Context, Data, Error, THEME_COLOR}; /// Run a recorded macro #[poise::command( @@ -17,7 +17,17 @@ pub async fn run_macro( ) -> Result<(), Error> { match guild_command_macro(&Context::Application(ctx), &name).await { Some(command_macro) => { - ctx.defer_response(false).await?; + Context::Application(ctx) + .send(|b| { + b.embed(|e| { + e.title("Running Macro").color(*THEME_COLOR).description(format!( + "Running macro {} ({} commands)", + command_macro.name, + command_macro.commands.len() + )) + }) + }) + .await?; for command in command_macro.commands { if let Some(action) = command.action {