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

Interception of incomplete commands #38

Open Sheridan opened 7 years ago

Sheridan commented 7 years ago

The bot engine intercepts incomplete commands. For example, if you pass a command /g to the hello-bot, it will react as if it were passed to /greet

zmeyc commented 7 years ago

This is intended behavior. For example instead of "zone list" user can type "z list". They're also supported in subcommands, i.e. router["zone list"] = f() will also react to "z l". Probably we need a flag to optionally disable abbreviations.

Sheridan commented 7 years ago

Yes, we need a flag, because many still remember IRC and write /me .... If the bot has a command /menu, then it call :(