diff --git a/app/app.go b/app/app.go index 7293605..9d5dcb9 100644 --- a/app/app.go +++ b/app/app.go @@ -85,6 +85,15 @@ func (a *App) handler(session *discordgo.Session, message *discordgo.MessageCrea }, } + defer func() { + if r := recover(); r != nil { + printError(a, h, Error{ + Msg: "panic!", + Err: fmt.Errorf("%v", r), + }) + } + }() + if h.Message.Author.ID == h.Session.State.User.ID { return }