Link all top-level commands with macro recording/replaying logic
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
use poise::{serenity_prelude::CreateEmbed, CreateReply};
|
||||
|
||||
use super::super::autocomplete::macro_name_autocomplete;
|
||||
use crate::{models::command_macro::guild_command_macro, Context, Data, Error, THEME_COLOR};
|
||||
use crate::{
|
||||
models::command_macro::guild_command_macro, utils::Recordable, Context, Data, Error,
|
||||
THEME_COLOR,
|
||||
};
|
||||
|
||||
/// Run a recorded macro
|
||||
#[poise::command(
|
||||
@@ -32,7 +35,9 @@ pub async fn run_macro(
|
||||
.await?;
|
||||
|
||||
for command in command_macro.commands {
|
||||
command.execute(poise::ApplicationContext { ..ctx }).await?;
|
||||
command
|
||||
.run(poise::Context::Application(poise::ApplicationContext { ..ctx }))
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user