migration for $r commands

This commit is contained in:
jude
2022-08-14 16:22:00 +01:00
parent 25b84880a5
commit bb3386c4e8
7 changed files with 307 additions and 119 deletions

View File

@ -2,6 +2,7 @@ use poise::serenity::model::{
application::interaction::application_command::CommandDataOption, id::GuildId,
};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use crate::{Context, Data, Error};
@ -29,6 +30,13 @@ pub struct CommandMacro<U, E> {
pub commands: Vec<RecordedCommand<U, E>>,
}
pub struct RawCommandMacro {
pub guild_id: GuildId,
pub name: String,
pub description: Option<String>,
pub commands: Value,
}
pub async fn guild_command_macro(
ctx: &Context<'_>,
name: &str,