macro_rules! handler {
($ctx:ident => $body:expr) => { ... };
($ctx:ident, $arg:ident => $body:expr) => { ... };
($ctx:ident, $arg1:ident, $arg2:ident => $body:expr) => { ... };
}Expand description
Create a handler closure that wraps the body in Box::pin(async move { ... }).
§Variants
ⓘ
// 1-arg: command, callback, on_unrecognized
handler!(ctx => { ctx.navigate(...).await })
// 2-arg: on_input, on_any_text, on_message_edited
handler!(ctx, text => { ctx.navigate(...).await })
// 3-arg: on_inline
handler!(ctx, query, offset => { ... })