Fixing handlers priority.

This commit is contained in:
Alexey Skobkin 2024-10-28 01:55:17 +03:00
parent 1f9583cb29
commit edf2158d29
Signed by: skobkin
GPG key ID: 4389E670595BF8A8

View file

@ -99,11 +99,11 @@ func (b *Bot) Run() error {
bh.Use(b.chatTypeStatsCounter)
// Command handlers
bh.Handle(b.textMessageHandler, th.AnyMessageWithText())
bh.Handle(b.startHandler, th.CommandEqual("start"))
bh.Handle(b.summarizeHandler, th.Or(th.CommandEqual("summarize"), th.CommandEqual("s")))
bh.Handle(b.statsHandler, th.CommandEqual("stats"))
bh.Handle(b.helpHandler, th.CommandEqual("help"))
bh.Handle(b.textMessageHandler, th.AnyMessageWithText())
bh.Start()