diff options
| author | Max Audron <audron@cocaine.farm> | 2021-10-10 16:11:00 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-10-10 16:11:00 +0200 |
| commit | a1f36810f47cb16bcd308665a68f4899b1d00ef1 (patch) | |
| tree | 686c9c13122703eebd728e816bc4b67b0d99fba0 /src/hooks/intensify.rs | |
| parent | set correct path for rust ci template (diff) | |
fix and improve hook error handling
Diffstat (limited to '')
| -rw-r--r-- | src/hooks/intensify.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/intensify.rs b/src/hooks/intensify.rs index 87a4edf..4c63598 100644 --- a/src/hooks/intensify.rs +++ b/src/hooks/intensify.rs @@ -1,4 +1,4 @@ -use anyhow::Result; +use anyhow::{Result, Context}; use irc::client::prelude::*; use macros::privmsg; @@ -10,7 +10,7 @@ pub fn intensify(bot: &crate::Bot, msg: Message) -> Result<()> { let content = chars.as_str(); bot.send_privmsg( - msg.response_target().unwrap(), + msg.response_target().context("failed to get response target")?, format!("\x02\x0304[\x1d{} INTENSIFIES\x1d]\x03\x0F", content.to_uppercase()).as_str(), )?; }) |
