From dc6b7534abdce055d898ffd273a3c002be65c9bc Mon Sep 17 00:00:00 2001 From: xenofem Date: Fri, 19 Jun 2020 16:29:09 -0400 Subject: [PATCH] clean up warnings --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index c727a4a..1ffbf4b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,6 @@ use serenity::{ prelude::*, }; use std::fs::read_to_string; -use std::process::exit; use std::sync::Arc; use std::time::Duration; @@ -82,7 +81,7 @@ async fn interval_loop(ctx: Arc) { let channel_id = ctx.data.read().await.get::().unwrap().clone(); loop { let sentence = ctx.data.read().await.get::().unwrap().generate(); - channel_id.say(&ctx.http, sentence).await; + channel_id.say(&ctx.http, sentence).await.unwrap(); tokio::time::delay_for(Duration::from_secs(*ctx.data.read().await.get::().unwrap())).await; } } @@ -92,7 +91,7 @@ impl EventHandler for Handler { async fn message(&self, ctx: Context, msg: Message) { if mentions_me(&ctx, &msg).await { let sentence = ctx.data.read().await.get::().unwrap().generate(); - msg.channel_id.say(&ctx.http, sentence).await; + msg.channel_id.say(&ctx.http, sentence).await.unwrap(); } } @@ -136,7 +135,7 @@ async fn main() { data.insert::(config.channel_id); data.insert::(false); } - client.start().await; + client.start().await.unwrap(); } } }