修修补补

This commit is contained in:
shenjack 2024-08-18 02:34:32 +08:00
parent 1c62e4aa0e
commit ee2c51fbcc
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 6 additions and 3 deletions

View File

@ -103,7 +103,10 @@ impl PyStatus {
pub fn set_status(path: &Path, status: bool) {
let cfg = Self::get_config_mut();
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 {

View File

@ -15,7 +15,7 @@ use tracing::{event, span, Level};
use crate::config::TailchatConfig;
use crate::data_struct::tailchat::status::{BotStatus, LoginData};
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(
config: TailchatConfig,
@ -101,7 +101,7 @@ pub async fn start_tailchat(
event!(Level::INFO, "发送启动消息到: {}|{}", con, group);
let startup_msg =
crate::data_struct::tailchat::messages::SendingMessage::new_without_meta(
format!("shenbot v{}-{} 启动成功", crate::VERSION, crate::TAILCHAT_VERSION),
version_str(),
con.clone(),
Some(group.clone()),
);