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