diff --git a/src/config.rs b/src/config.rs index 6b2ee4d..55e36f7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,7 +29,6 @@ pub fn load_config() -> anyhow::Result { panic!("No reactions found in config file"); } - info!("Loaded config: {:?}", config.reactions); Ok(config) } diff --git a/src/main.rs b/src/main.rs index e69f95e..dbe697c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use crate::client::discord::create_discord_client; use crate::config::{load_config, IdeaReactionEnv, ENV_CONFIG}; use dotenvy::dotenv; use std::env; +use tracing::info; mod client; mod config; @@ -18,7 +19,8 @@ async fn main() -> anyhow::Result<()> { let mut client = create_discord_client(&ENV_CONFIG.get().unwrap().discord_api_token).await?; - load_config()?; + let config = load_config()?; + info!("Loaded config: {:?}", config.reactions); if let Err(why) = client.start().await { println!("Failed run discord client: {:?}", why);