poise
poise copied to clipboard
autocomplete broke up when there's another command having same name using rename macro
In my case, I want to make a command's prefix and slash seperately, like belowed
#[poise::command(slash_command, rename = "test")]
pub async fn test_slash(
ctx: Context<'_>,
#[autocomplete = "autocomplete_number11"]
args: Option<u64>,
) -> Result<(), Error> {
Ok(())
}
#[poise::command(prefix_command)]
pub async fn test(ctx: Context<'_>, #[rest] args: Option<Args>) -> Result<(), Error> {
Ok(())
}
and the autocomplete wouldn't work, nor
#[poise::command(slash_command)]
pub async fn test(
ctx: Context<'_>,
#[autocomplete = "autocomplete_number11"]
args: Option<u64>,
) -> Result<(), Error> {
Ok(())
}
#[poise::command(prefix_command, rename = "test")]
pub async fn test_prefix(ctx: Context<'_>, #[rest] args: Option<Args>) -> Result<(), Error> {
Ok(())
}
or is there a better way to do what I trying to do?
thank you so much