mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 04:31:05 +08:00
ree
This commit is contained in:
parent
c970e6ae45
commit
b8fd3cfc19
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user