Add config option for channel mapping

This commit is contained in:
Yash Karandikar 2022-04-06 11:09:09 -05:00
parent 3fb3a0dadf
commit bef05fa07c

View file

@ -41,6 +41,7 @@ struct DircordConfig {
tls: Option<bool>,
channel_id: u64,
raw_prefix: Option<String>,
channels: HashMap<String, u64>
}
struct Handler;
@ -471,7 +472,7 @@ async fn main() -> anyhow::Result<()> {
nickname: conf.nickname,
server: Some(conf.server),
port: conf.port,
channels: vec![conf.channel.clone()],
channels: conf.channels.keys().map(|s| s.to_owned()).collect(),
use_tls: conf.tls,
umodes: conf.mode,
..Config::default()