This commit is contained in:
shenjack 2024-08-02 19:25:39 +08:00
parent c970e6ae45
commit b8fd3cfc19
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,7 @@
use std::env;
use std::fs;
use colored::Colorize;
use serde::Deserialize;
use toml::from_str;
use tracing::warn;
@ -86,7 +87,10 @@ impl BotConfig {
let mut args = env::args();
while let Some(arg) = args.next() {
if arg == "-c" {
config_file_path = args.next().expect("No config path given");
config_file_path = args.next().expect(&format!(
"{}",
"No config path given\nUsage: -c <config_file_path>".red()
));
break;
}
}

View File

@ -95,6 +95,17 @@ pub async fn start_tailchat(
event!(Level::INFO, "{}", "tailchat 已经加入房间".green());
if config.notice_start {
for (group, room) in config.notice_room {
let startup_msg =
crate::data_struct::tailchat::messages::SendingMessage::new_without_meta(
"ica-rs 启动成功",
group.clone(),
Some(room.clone()),
);
}
}
stop_reciver.await.ok();
event!(Level::INFO, "socketio client stopping");
match socket.disconnect().await {