Found bug with TelegramRouter().otherwise(controller) method.
Function argument controller is instance of class TelegramBaseController, which has function methodForCommand() implemented for binding commands -> routes -> actions.
So, when we call tg.router.otherwise(new OtherwiseController()), if statement on TelegramBaseController.js#L59 will fire TypeError: Cannot read property 'toString' of undefined, because as argument to .otherwise() we provided object of Controller, not an command param of string type, that's why command.toString() firing Error.
Found bug with
TelegramRouter().otherwise(controller)
method.Function argument
controller
is instance of classTelegramBaseController
, which has functionmethodForCommand()
implemented for binding commands -> routes -> actions.So, when we call
tg.router.otherwise(new OtherwiseController())
, if statement on TelegramBaseController.js#L59 will fireTypeError: Cannot read property 'toString' of undefined
, because as argument to.otherwise()
we provided object ofController
, not ancommand
param of string type, that's whycommand.toString()
firing Error.Gonna fix it today & send PR :ok_hand: