ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Inconsistency in echo example #7

Closed facorazza closed 6 years ago

facorazza commented 6 years ago

When a command is called, for example /hello, it gets treated twice. Once in bot.onUpdate(handler) and the second time in bot.onCommand("hello", greatingCb). How should I go about executing only a piece of code?

I'd like to execute the related code for each command by calling .onCommand and deal with all other things with .onUpdate. Now I'm not sure this is the right way of dealing with new messages so please tell me if I'm wrong.

ba0f3 commented 6 years ago

fixed in recent releases