diff --git a/src/core_commands.rs b/src/core_commands.rs index f92f484..5dfa4e1 100644 --- a/src/core_commands.rs +++ b/src/core_commands.rs @@ -93,6 +93,19 @@ async fn set_config(ctx: &Context, msg: &Message, mut args: Args) -> CommandResu Ok(()) } +#[command] +async fn dump_config(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { + let data = &ctx.data.read().await; + let config = match data.get::() { + Some(c) => c.lock().await, + None => Err("Could not lock database!".to_string())? + }; + + msg.reply_ping(&ctx, format!("Config dump; {:?}", &config.config)).await?; + + Ok(()) +} + #[command] async fn get_environment(ctx: &Context, msg: &Message, _: Args) -> CommandResult {