rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
375 stars 63 forks source link

Override the commands #128

Open matsotaa opened 11 months ago

matsotaa commented 11 months ago

Add the opportunity to override commands could be very useful and will make your lib more flexible. I might missed something, but I'm no seeing any opportunity to stop some botCommands to be executed. F.E.: I need to let user go forward by bot, but command /back would be always the same in stack of Paths the one were I added it first. It would be great to have opportunity to let user go back at every flow within the same command. The overriding options would be great. I can't even delete some command that.

Anyway making var paths = [Path]() public will help to devs to make their own customisations. Please consider that suggestion Also make name public in Command, or make it Equatable would be great as well, using fetchFrom seems odd a little bit