This project embodies an attempt to create a Discord/IRC (and possibly more extensible) bridge. Not finished.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
692 B

extern crate serde;
extern crate serde_json;
extern crate serenity;
mod endpoint;
//mod local_endpoint;
mod discord_endpoint;
mod refset;
mod itercomb;
use std::thread;
use std::fs;
use std::path;
use discord_endpoint::DiscordConfig;
fn main()
{
let cfg_string = match fs::read_to_string(path::Path::new("config.json"))
{
Ok(s) => s,
Err(e) =>
{
println!("I/O error: {}", e.to_string());
return;
}
};
let config: DiscordConfig = match serde_json::from_str(&cfg_string)
{
Ok(config) => config,
Err(e) =>
{
println!("deserialization of JSON error: {}", e.to_string());
return;
},
};
println!("config: {:?}", config);
}