From 891e83b54c047771b55fa80209feb49d2bf2d2e7 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 17 Jul 2022 18:22:57 -0400 Subject: [PATCH] actually use cmderror type --- util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util.go b/util.go index 0a3553f..f193c99 100644 --- a/util.go +++ b/util.go @@ -22,10 +22,11 @@ func ParseCommand(evt *event.Event, prefix string) ([]string, error) { body := evt.Content.AsMessage().Body bodyS := strings.Split(body, " ") if bodyS[0] != fmt.Sprintf("!%v", prefix) { - return []string{}, errors.New("no prefix found") + return []string{}, ErrCmdParseNoPrefix + } if len(bodyS) < 2 { - return []string{}, errors.New("nothing to parse from command") + return []string{}, ErrCmdParseNoCmd } return bodyS[1:], nil