remove unused imports/vars

master
Devin R 2020-04-14 08:45:40 -04:00
parent 018ffaf1a8
commit 6f2b5194d1
1 changed files with 6 additions and 4 deletions

View File

@ -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();
} }