From 499ec2de8d0d2a5010d2d6f9f0724e1a87d77475 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Sun, 31 May 2020 11:17:16 +0800 Subject: [PATCH] feat: Report command failures out loud instead of silently failing --- commands/commands.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/commands.go b/commands/commands.go index bf10f7f..4d2eab3 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -31,6 +31,10 @@ func Event(dg *discordgo.Session, m *discordgo.MessageCreate) { defer func() { if r := recover(); r != nil { // Oh crap. We recovered from a panic. + util.SendFailEmbed( + dg, m.ChannelID, "Error", + "A fatal error has occurred while processing this command. This event has been reported.", + ) if val, ok := r.(error); ok { util.ReportError(dg, val) } else {