mirror of
https://github.com/tucnak/telebot
synced 2024-11-03 09:40:18 +00:00
Command routing fix.
This commit is contained in:
parent
ddc9f75fb2
commit
b4bec5b6f7
2
bot.go
2
bot.go
@ -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…
Reference in New Issue
Block a user