poise-default-slash-argument

Crates.iopoise-default-slash-argument
lib.rspoise-default-slash-argument
version0.1.0
sourcesrc
created_at2024-06-18 04:32:52.979472
updated_at2024-06-18 04:32:52.979472
descriptionDefault argument wrapper for poise slash commands
homepage
repositoryhttps://github.com/o-dasher/poise-default-slash-argument.git
max_upload_size
id1275119
size7,797
O Thiago (o-dasher)

documentation

https://docs.rs/poise-default-slash-argument

README

This library provides a generic wrapper struct DefaultSlash designed to simplify the handling and parsing of command arguments in Discord bots using the poise framework. You may use it just like the following example:

#[command(slash_command)]
pub async fn search(
    ctx: MyPoiseContext<'_>,
    ephemeral: DefaultSlash<bool>,
) -> MyPoiseResult {
    log::debug("{}", ephemeral.0);
    todo!();
}
Commit count: 1

cargo fmt