diff --git a/src/lib.rs b/src/lib.rs index c682364..8a7273d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,6 +33,9 @@ pub struct Config { pub committee_server: GuildId, pub committee_role: RoleId, pub committee_category: ChannelId, + + // items pertaining to compsoc only + pub compsoc_server: GuildId, } impl TypeMapKey for Config { type Value = Arc>; @@ -58,6 +61,7 @@ pub fn get_config() -> Config { committee_server: GuildId::new(1), committee_role: RoleId::new(1), committee_category: ChannelId::new(1), + compsoc_server: GuildId::new(1), }; if let Ok(x) = env::var("DATABASE_HOME") { @@ -110,6 +114,12 @@ pub fn get_config() -> Config { } } + if let Ok(x) = env::var("COMPSOC_DISCORD") { + if let Ok(x) = x.trim().parse::() { + config.compsoc_server = GuildId::new(x); + } + } + config }