ignore case

This commit is contained in:
Aaron Bieber 2020-02-01 15:14:24 -07:00
parent 493f07fc6d
commit b69128e804
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ type BotSnack struct {
}
func (h *BotSnack) match(msg string) bool {
re := regexp.MustCompile(`botsnack`)
re := regexp.MustCompile(`(?i)botsnack`)
return re.MatchString(msg)
}

View File

@ -13,7 +13,7 @@ type Hi struct {
}
func (h *Hi) match(msg string) bool {
re := regexp.MustCompile(`^hi|hi$`)
re := regexp.MustCompile(`(?i)^hi|hi$`)
return re.MatchString(msg)
}