Crate telegram_bot2_macros

Source

Macros§

commands
Return a map of commands to be used by BotBuilder::commands
daemons
Returns the daemons associated to the given functions
handlers
Returns the handler for the given function

Attribute Macros§

bot
Builds a main around the function. It should return a BotBuilder, which will be launched by the main.
command
Define a command handler
daemon
You can setup daemons that run in the background and have access to the BotState. Daemon function are annotated with #[daemon] and require a interval parameter, which specifies the time between two calls (in seconds).
handler
Creates a generic update handler for the function

Derive Macros§

Builder
Creates a builder for the structure. It will have the following properties:
FileHolder