Crate telegram_bot2_macros
source ·Macros
Return a map of commands to be used by
BotBuilder::commands
Returns the daemons associated to the given functions
Returns the handler for the given function
Attribute Macros
Builds a main around the function.
It should return a BotBuilder, which will be launched by the main.
Define a command handler
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).Creates a generic update handler for the function
Derive Macros
Creates a builder for the structure.
It will have the following properties: