Update error handler to use error text if message is empty

pull/1/head
DustyP 6 years ago
parent 1ca743ac1b
commit 89871e8086

@ -93,6 +93,10 @@ func getPrefixes(guild_id string) []string {
func ErrorHandler(ErrorChan chan disgoman.CommandError) { func ErrorHandler(ErrorChan chan disgoman.CommandError) {
for ce := range ErrorChan { for ce := range ErrorChan {
_, _ = ce.Context.Send(ce.Message) msg := ce.Message
if msg == "" {
msg = ce.Error.Error()
}
_, _ = ce.Context.Send(msg)
} }
} }

Loading…
Cancel
Save