mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-27 06:35:06 +08:00
068 working
This commit is contained in:
parent
b1511a972f
commit
d9c17ea064
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -659,7 +659,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ica-rs"
|
||||
version = "0.6.7"
|
||||
version = "0.6.8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.22.1",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue
Block a user