From ffba60b278162707bc4eb004c3bfb6b2e9595213 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 8 May 2024 12:55:35 -0400 Subject: rework to use songbird --- src/config.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index e03dbbe..59bb4c3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,16 +1,14 @@ use std::path::PathBuf; -use serenity::{ - model::id::{ - GuildId, - UserId, - ChannelId, - }, +use serenity::model::id::{ + ChannelId, + GuildId, + UserId, }; use dotenv::dotenv; -use lazy_static::lazy_static; use envconfig::Envconfig; +use lazy_static::lazy_static; lazy_static! { pub static ref CONFIG: Config = { @@ -18,7 +16,6 @@ lazy_static! { Config::init_from_env().unwrap() }; - pub static ref FFMPEG_COMMAND: String = { let result = CONFIG.ffmpeg.clone().unwrap_or("youtube-dl".to_owned()); log::debug!("got ffmpeg: {}", result); @@ -53,13 +50,16 @@ pub struct Config { #[envconfig(from = "RESTRICT")] pub restrict: Option, + #[envconfig(nested = true)] pub discord: DiscordConfig, + #[envconfig(nested = true)] pub sheets: SheetsConfig, } #[derive(Envconfig)] pub struct DiscordConfig { + #[envconfig(nested = true)] pub auth: DiscordAuth, #[envconfig(from = "TARGET_GUILD")] -- cgit v1.3.1