use std::io; use log::{error, LevelFilter}; use omglib::example_common::load_config; use omglib::robot::dingtalk::DingTalkMsg; use omglib::robot::traits::IMRobot; use omglib::utils::log_util; #[tokio::main] #[allow(unused_variables)] async fn main() -> io::Result<()>{ let mut conf_path = String::new(); let config = load_config(&mut conf_path, "etc/config2.toml")?; log_util::setup_log(LevelFilter::Info, None, None, true, None).unwrap(); let key_map = config.get_map("dingtalk.robot").unwrap(); let messenger = DingTalkMsg::new(key_map); if let Err(e) = messenger.send_text("funding", Some("Hello, Robot"), "# Build ``` ").await { error!("Error: {}", e); } Ok(()) }