PaulSonOfLars / gotgbot

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.
MIT License
442 stars 105 forks source link

[Draft] Add new message.CommandName filters #159

Open PaulSonOfLars opened 2 months ago

PaulSonOfLars commented 2 months ago

What

This change adds a few new message filters to allow MessageHandlers to function similarly to CommandHandlers. With this new change, a CommandHandler can be considered a specialised MessageHandler (with command filters pre-applied).

Worth noting that with this change, the CommandHandler type becomes significantly less useful; maybe the type should be removed, and the NewCommand method should be left simply as a wrapper around NewMessage?

Impact