mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
修修补补
This commit is contained in:
parent
1c62e4aa0e
commit
ee2c51fbcc
|
@ -103,7 +103,10 @@ impl PyStatus {
|
||||||
pub fn set_status(path: &Path, status: bool) {
|
pub fn set_status(path: &Path, status: bool) {
|
||||||
let cfg = Self::get_config_mut();
|
let cfg = Self::get_config_mut();
|
||||||
cfg.set_status(path, status);
|
cfg.set_status(path, status);
|
||||||
cfg.sync_status_from_config();
|
let map = Self::get_map_mut();
|
||||||
|
if let Some(plugin) = map.get_mut(path) {
|
||||||
|
plugin.enabled = status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn display() -> String {
|
pub fn display() -> String {
|
||||||
|
|
|
@ -15,7 +15,7 @@ use tracing::{event, span, Level};
|
||||||
use crate::config::TailchatConfig;
|
use crate::config::TailchatConfig;
|
||||||
use crate::data_struct::tailchat::status::{BotStatus, LoginData};
|
use crate::data_struct::tailchat::status::{BotStatus, LoginData};
|
||||||
use crate::error::{ClientResult, TailchatError};
|
use crate::error::{ClientResult, TailchatError};
|
||||||
use crate::{async_any_callback_with_state, async_callback_with_state, StopGetter};
|
use crate::{async_any_callback_with_state, async_callback_with_state, version_str, StopGetter};
|
||||||
|
|
||||||
pub async fn start_tailchat(
|
pub async fn start_tailchat(
|
||||||
config: TailchatConfig,
|
config: TailchatConfig,
|
||||||
|
@ -101,7 +101,7 @@ pub async fn start_tailchat(
|
||||||
event!(Level::INFO, "发送启动消息到: {}|{}", con, group);
|
event!(Level::INFO, "发送启动消息到: {}|{}", con, group);
|
||||||
let startup_msg =
|
let startup_msg =
|
||||||
crate::data_struct::tailchat::messages::SendingMessage::new_without_meta(
|
crate::data_struct::tailchat::messages::SendingMessage::new_without_meta(
|
||||||
format!("shenbot v{}-{} 启动成功", crate::VERSION, crate::TAILCHAT_VERSION),
|
version_str(),
|
||||||
con.clone(),
|
con.clone(),
|
||||||
Some(group.clone()),
|
Some(group.clone()),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user