068 working

This commit is contained in:
shenjack 2024-06-15 02:25:04 +08:00
parent b1511a972f
commit d9c17ea064
Signed by: shenjack
GPG Key ID: 7B1134A979775551
4 changed files with 7 additions and 7 deletions

2
Cargo.lock generated
View File

@ -659,7 +659,7 @@ dependencies = [
[[package]]
name = "ica-rs"
version = "0.6.7"
version = "0.6.8"
dependencies = [
"anyhow",
"base64 0.22.1",

View File

@ -1,6 +1,6 @@
[package]
name = "ica-rs"
version = "0.6.7"
version = "0.6.8"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -26,7 +26,7 @@ pub type StopGetter = tokio::sync::oneshot::Receiver<()>;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const ICA_VERSION: &str = "1.6.0";
pub const TAILCHAT_VERSION: &str = "1.1.0";
pub const TAILCHAT_VERSION: &str = "1.2.0";
#[macro_export]
macro_rules! async_callback_with_state {

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use colored::Colorize;
use rust_socketio::asynchronous::Client;
use rust_socketio::{Event, Payload};
use tracing::info;
use tracing::{event, info, Level};
use crate::data_struct::tailchat::messages::ReceiveMessage;
use crate::data_struct::tailchat::status::{BotStatus, UpdateDMConverse};
@ -68,12 +68,12 @@ pub async fn on_message(payload: Payload, client: Client, status: Arc<BotStatus>
let message: ReceiveMessage = match serde_json::from_value(value.clone()) {
Ok(v) => v,
Err(e) => {
info!("tailchat_msg {}", value.to_string().red());
info!("tailchat_msg {}", format!("{:?}", e).red());
event!(Level::WARN, "tailchat_msg {}", value.to_string().red());
event!(Level::WARN, "tailchat_msg {}", format!("{:?}", e).red());
return;
}
};
info!("tailchat_msg {}", message.to_string().cyan());
event!(Level::INFO, "tailchat_msg {}", message.to_string().yellow());
if !message.is_reply() {
if message.content == "/bot-rs" {