bot

Attribute Macro bot 

Source
#[bot]
Expand description

Builds a main around the function. It should return a BotBuilder, which will be launched by the main.

The return type of the function does not have to be specified and can be _

ยงExample

#[bot]
async fn bot() -> _ {
    BotBuilder::new()
        .interval(Duration::from_secs(0))
        .timeout(5)
        .handler(handlers![handler])
        .commands(commands![soup])
}