Update error handler to use error text if message is empty
This commit is contained in:
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…
x
Reference in New Issue
Block a user