aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs16
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")]