#slash-command #command-arguments #wrapper #poise

yanked poise-default-slash-argument

Default argument wrapper for poise slash commands

1 unstable release

0.1.0 Jun 18, 2024

#32 in #slash-command

MIT license

4KB

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!();
}

Dependencies

~15–28MB
~426K SLoC