mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 04:31:05 +08:00
感觉还行
This commit is contained in:
parent
99082ccfd7
commit
1eba64bf9e
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -653,9 +653,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ica-rs"
|
||||
version = "0.6.0-dev"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"colored",
|
||||
"ed25519",
|
||||
|
|
|
@ -1,24 +1,31 @@
|
|||
[package]
|
||||
name = "ica-rs"
|
||||
version = "0.6.0-dev"
|
||||
version = "0.6.1"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
default = ["ica", "tailchat"]
|
||||
ica = ["dep:ed25519", "dep:ed25519-dalek", "dep:hex", "dep:rust_socketio"]
|
||||
ica = [
|
||||
"dep:ed25519",
|
||||
"dep:ed25519-dalek",
|
||||
"dep:hex",
|
||||
"dep:rust_socketio",
|
||||
"dep:base64",
|
||||
]
|
||||
tailchat = ["dep:rust_socketio", "dep:md-5", "dep:reqwest"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# ica
|
||||
base64 = { version = "0.22", optional = true }
|
||||
ed25519 = { version = "2.2", optional = true }
|
||||
ed25519-dalek = { version = "2.1", optional = true }
|
||||
hex = { version = "0.4", optional = true }
|
||||
|
||||
# tailchat
|
||||
reqwest = { version = "0.12.2", optional = true }
|
||||
reqwest = { version = "0.12.4", optional = true }
|
||||
md-5 = { version = "0.10.6", optional = true }
|
||||
|
||||
# ica & tailchat (socketio)
|
||||
|
|
|
@ -33,12 +33,14 @@ pub async fn add_message(payload: Payload, client: Client) {
|
|||
info!("add_message {}", message.to_string().cyan());
|
||||
// 就在这里处理掉最基本的消息
|
||||
// 之后的处理交给插件
|
||||
if message.content().eq("/bot-rs") && !message.is_from_self() && !message.is_reply() {
|
||||
let reply = message.reply_with(&format!(
|
||||
"shenbot v{}\nica-async-rs pong v{}",
|
||||
VERSION, ICA_VERSION
|
||||
));
|
||||
send_message(&client, &reply).await;
|
||||
if !message.is_from_self() && !message.is_reply() {
|
||||
if message.content() == "/bot-rs" {
|
||||
let reply = message.reply_with(&format!(
|
||||
"shenbot v{}\nica-async-rs pong v{}",
|
||||
VERSION, ICA_VERSION
|
||||
));
|
||||
send_message(&client, &reply).await;
|
||||
}
|
||||
}
|
||||
// python 插件
|
||||
py::call::ica_new_message_py(&message, &client).await;
|
||||
|
|
Loading…
Reference in New Issue
Block a user