Handling commands
Handle when user writes a command (e.g. /start, /help, /menu)
Handle command
To handle a command, you can use @OnCommand
decorator
Optional. @OnCommand
takes command you want to listen to as argument
Get command params
You can get command params too (e.g. when user writes /start hello or follows the bot link with some params). Use @CommandParams
property decorator to it
You can read more about property decorators here
Example
app.controller.ts
Last updated