diff --git a/bot/handlers.go b/bot/handlers.go index b065b88..4cc8d39 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -91,6 +91,9 @@ func (b *Bot) isCmd(message string) (bool, string) { iscmd = true message = message[len(cmdc):] } else if match, _ := regexp.MatchString(rex, lowerMessage); match { + if len(message) < len(botnick) { + return false, message + } iscmd = true message = message[len(botnick):]