From 18abf2d8410bd31f16b406e6e5be18c9c14b653f Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Mon, 14 Feb 2022 10:55:33 -0500 Subject: Add CI Update dependencies Update docker image Fix CI Docker --- src/handler.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/handler.rs') diff --git a/src/handler.rs b/src/handler.rs index 00cf0eb..ef8fc00 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -53,12 +53,15 @@ pub async fn event_handler( .await?; } - let dm_chan = add_reaction + if let Ok(dm_chan) = add_reaction .user_id .unwrap() .create_dm_channel(&ctx.http) - .await?; - dm_chan.say(ctx, format!("Toggled the role!")).await?; + .await { + dm_chan.say(ctx, format!("Toggled the role!")).await?; + } else { + println!("Could not DM user, but we did the role anyways"); + } add_reaction.delete(&ctx.http).await?; } -- cgit v1.2.3