circe/examples/config-from-toml/src/main.rs
2021-11-13 11:47:42 -06:00

16 lines
407 B
Rust

use circe::{commands::Command, Client, Config};
fn main() -> Result<(), std::io::Error> {
let config = Config::from_toml("Config.toml")?;
let mut client = Client::new(config).unwrap();
client.identify().unwrap();
loop {
if let Ok(ref command) = client.read() {
if let Command::OTHER(line) = command {
print!("{}", line);
}
}
}
}