Command routing fix.

pull/108/head
Ian Byrd 7 years ago
parent ddc9f75fb2
commit b4bec5b6f7
No known key found for this signature in database
GPG Key ID: 598F598CA3B8055F

@ -83,7 +83,7 @@ func (b *Bot) Handle(endpoint string, handler interface{}) {
b.handlers[endpoint] = handler
}
var cmdRx = regexp.MustCompile(`^\/(\w+)(@(\w+))?(\s|$)`)
var cmdRx = regexp.MustCompile(`^(\/\w+)(@(\w+))?(\s|$)`)
func (b *Bot) handleCommand(m *Message, cmdName, cmdBot string) bool {
// Group-syntax: "/cmd@bot"

Loading…
Cancel
Save