Create a bot
the telegram secret token
Optionaloptions: { defaultCommand?: string }optional configuration for the bot
The telegram api URL
The telegram commands record map
The current bot context
Default command to use when no matching command is found
Middleware functions to run before handlers
The telegram token
The telegram update object
The telegram webhook object
Register a command handler
the command name (without /)
the handler function
Handle a request on a given bot
the request to handle
Register a function on the bot
the event or command name
the bot context
Register a callback query handler
the handler function
Register a message handler
the handler function
Register a photo handler
the handler function
Register multiple command handlers at once
object mapping command names to handler functions
Register middleware to run before all handlers
the middleware function
Class representing a telegram bot.