All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2
16 lines
286 B
Go
16 lines
286 B
Go
package discord
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"gitea.dwysokinski.me/twhelp/dcbot/internal/domain"
|
|
)
|
|
|
|
func messageFromError(err error) string {
|
|
var userErr domain.UserError
|
|
if !errors.As(err, &userErr) {
|
|
return "something went wrong, please try again later"
|
|
}
|
|
return userErr.UserError()
|
|
}
|