remove unused imports/vars
parent
018ffaf1a8
commit
6f2b5194d1
|
@ -11,7 +11,7 @@ use matrix_sdk::{
|
||||||
};
|
};
|
||||||
use tokio::runtime::Handle;
|
use tokio::runtime::Handle;
|
||||||
use tokio::sync::{
|
use tokio::sync::{
|
||||||
mpsc::{self, Receiver, Sender},
|
mpsc::{self, Sender},
|
||||||
Mutex,
|
Mutex,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,14 +30,16 @@ impl EventEmitter for CommandBot {
|
||||||
async fn on_room_message(&mut self, room: Arc<Mutex<Room>>, event: Arc<Mutex<MessageEvent>>) {
|
async fn on_room_message(&mut self, room: Arc<Mutex<Room>>, event: Arc<Mutex<MessageEvent>>) {
|
||||||
if let MessageEvent {
|
if let MessageEvent {
|
||||||
content: MessageEventContent::Text(TextMessageEventContent { body: msg_body, .. }),
|
content: MessageEventContent::Text(TextMessageEventContent { body: msg_body, .. }),
|
||||||
sender,
|
|
||||||
..
|
..
|
||||||
} = event.lock().await.deref()
|
} = event.lock().await.deref()
|
||||||
{
|
{
|
||||||
let room = room.lock().await;
|
let room = room.lock().await;
|
||||||
if msg_body.contains("!party") {
|
if msg_body.contains("!party") {
|
||||||
self.send
|
self.send
|
||||||
.send((room.room_id.clone(), "let's PARTY!! 🥳🎊🎉".to_string()))
|
.send((
|
||||||
|
room.room_id.clone(),
|
||||||
|
"🎉🎊🥳 let's PARTY!! 🥳🎊🎉".to_string(),
|
||||||
|
))
|
||||||
.await
|
.await
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
@ -89,7 +91,7 @@ async fn login_and_sync(
|
||||||
send_client
|
send_client
|
||||||
.lock()
|
.lock()
|
||||||
.await
|
.await
|
||||||
.room_send(&id, content)
|
.room_send(&id, content, None)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue