ignore case
This commit is contained in:
parent
493f07fc6d
commit
b69128e804
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user