diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 12:55:35 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:16:01 -0400 |
| commit | ffba60b278162707bc4eb004c3bfb6b2e9595213 (patch) | |
| tree | edf8172ecad59d46a6056944fd9e79f7dfb327c2 /src/config.rs | |
| parent | fe467f60d99efa54f2ef64606e7d39b9b06d7294 (diff) | |
rework to use songbird
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 16 |
1 files changed, 8 insertions, 8 deletions
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<PathBuf>, + #[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")] |
