#[command]Expand description
Procedural macro used to transform functions into commands
produces functions which can be passed to Framework::command
ยงExamples
/// This Doc comment will be the command description
#[command]
async fn say_hello(
ctx: Context,
#[option(
channel_type = "text",
name = "Channel"
description = "Text channel to say hello to"
)]
channel: Channel,
) {
channel
.id()
.send_message(&ctx.http(), |m| m.content("Hello, world!"))
.await;
ctx.reply_ephemeral("Sent message").await;
}