Fixing handlers priority.
This commit is contained in:
parent
1f9583cb29
commit
edf2158d29
|
@ -99,11 +99,11 @@ func (b *Bot) Run() error {
|
||||||
bh.Use(b.chatTypeStatsCounter)
|
bh.Use(b.chatTypeStatsCounter)
|
||||||
|
|
||||||
// Command handlers
|
// Command handlers
|
||||||
bh.Handle(b.textMessageHandler, th.AnyMessageWithText())
|
|
||||||
bh.Handle(b.startHandler, th.CommandEqual("start"))
|
bh.Handle(b.startHandler, th.CommandEqual("start"))
|
||||||
bh.Handle(b.summarizeHandler, th.Or(th.CommandEqual("summarize"), th.CommandEqual("s")))
|
bh.Handle(b.summarizeHandler, th.Or(th.CommandEqual("summarize"), th.CommandEqual("s")))
|
||||||
bh.Handle(b.statsHandler, th.CommandEqual("stats"))
|
bh.Handle(b.statsHandler, th.CommandEqual("stats"))
|
||||||
bh.Handle(b.helpHandler, th.CommandEqual("help"))
|
bh.Handle(b.helpHandler, th.CommandEqual("help"))
|
||||||
|
bh.Handle(b.textMessageHandler, th.AnyMessageWithText())
|
||||||
|
|
||||||
bh.Start()
|
bh.Start()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue