aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 044e6cf..1116b1f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -107,12 +107,16 @@ fn run() -> Result<()> {
result
})
- .after(|_ctx, _msg, cmd, err| {
+ .after(|_ctx, msg, cmd, err| {
match err {
Ok(()) => {
trace!("command '{}' completed successfully", cmd);
},
Err(e) => {
+ if let Err(e) = crate::commands::send(msg.channel_id, "BANIC", msg.tts) {
+ error!("sending BANIC: {}", e);
+ }
+
error!("error encountered handling command '{}': {:?}", cmd, e);
}
}