mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
如更
This commit is contained in:
parent
a02bb089a5
commit
ed6af04570
|
@ -146,7 +146,6 @@ pub async fn ica_delete_message_py(msg_id: ica::MessageId, client: &Client) {
|
||||||
pub async fn tailchat_new_message_py(
|
pub async fn tailchat_new_message_py(
|
||||||
message: &tailchat::messages::ReceiveMessage,
|
message: &tailchat::messages::ReceiveMessage,
|
||||||
client: &Client,
|
client: &Client,
|
||||||
status: Arc<BotStatus>,
|
|
||||||
) {
|
) {
|
||||||
verify_plugins();
|
verify_plugins();
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ pub async fn any_event(event: Event, payload: Payload, _client: Client, _status:
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::collapsible_if)]
|
#[allow(clippy::collapsible_if)]
|
||||||
pub async fn on_message(payload: Payload, client: Client, status: Arc<BotStatus>) {
|
pub async fn on_message(payload: Payload, client: Client, _status: Arc<BotStatus>) {
|
||||||
if let Payload::Text(values) = payload {
|
if let Payload::Text(values) = payload {
|
||||||
if let Some(value) = values.first() {
|
if let Some(value) = values.first() {
|
||||||
let message: ReceiveMessage = match serde_json::from_value(value.clone()) {
|
let message: ReceiveMessage = match serde_json::from_value(value.clone()) {
|
||||||
|
@ -85,7 +85,7 @@ pub async fn on_message(payload: Payload, client: Client, status: Arc<BotStatus>
|
||||||
send_message(&client, &reply).await;
|
send_message(&client, &reply).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
crate::py::call::tailchat_new_message_py(&message, &client, status.clone()).await;
|
crate::py::call::tailchat_new_message_py(&message, &client).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user