refactor: make select index optional

This commit is contained in:
iff 2025-01-07 01:56:58 +01:00
parent 195aa34f95
commit d7b57f204c
3 changed files with 3 additions and 2 deletions

View file

@ -258,7 +258,7 @@ pub fn select(suggest: &mut String, select_list: &mut Vec<TokenStream2>) {
unreachable!("Select suggestion does not support range");
}
} else {
unreachable!("Select suggestion must have a command index");
quote! {0}
};
let selection_list = if suggest.contains('(') {
let split = suggest[args.to_owned()]