Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade poise current to include poise next and serenity-next (#224)
* Optionally display subcommands in help menu Only one recursion level deep so far because infinite recursion would have been a pain and I don't even know if that's what users want so it's single recursion level for now and if someone complains I'll go through the async recursion trouble * Make a bunch of structs non_exhaustive... ...and rename AutocompleteChoice.name to label (I think it fits better) * Forgot enums (while applying non_exhaustive) * Rework of builtins::help() (#161) * Rework of builtins::help() * Use find_command instead of duplicating code * Fix env variable `set` -> `export` for Unix * Fix unneeded mut * cargo fmt --------- Co-authored-by: kangalioo <jannik.a.schaper@web.de> * Add HelpConfiguration:include_description #161 changed single help command to include description. This commit makes it optional (but keeps the new behavior as default) * Fix cargo test * Change Command field types - category: `Option<&'static str>` -> `Option<String>` - help_text: `Option<fn() -> String>` -> `Option<String>` - aliases: `&'static [&'static str]` -> `Vec<String>` - context_menu_name: `Option<&'static str>` -> `Option<String>` The &'static references meant you couldn't dynamically change those values which is very powerful so better do this breaking change now than potentially later. It's not like it hurts to use String and Vec here due to the allocations - every bot will have a two-digit, max three-digit number of Command instances anyways and they will all be initialized on startup. Also, the fn() in help_text was really ugly and was just a hack for rustbot to share common parts of the help text. But this should be done by just changing the help_text field in main() or whatever. Actually though, I was able to keep the #[command] attribute's help_text_fn field working. But it runs the function at command construction time now instead of on demand when help is called. So, behavior change technically * Add ChoiceParameter trait instead of direct impls Fixes #126 * Fix with simd-json (amend to 8471b6e) * Refinements to builtins::help (#167) * Refinements to builtins::help * Make rustfmt happy * Make MSRV happy --------- Co-authored-by: Rogier 'DocWilco' Mulhuijzen <github@bsdchicks.com> * Make FrameworkError and SlashArgError variants non_exhaustive * Migrate cooldowns to new version * Add CooldownContext struct to make Cooldowns usable in more situations (#175) * Convert Cooldowns to use HashMap instead of OrderedMap for better scaling (#180) * Convert poise builders to new serenity style * Swap to serenity 0.12.0 * Bump MSRV to match serenity's --------- Co-authored-by: kangalioo <jannik.a.schaper@web.de> Co-authored-by: docwilco <66911096+docwilco@users.noreply.github.com> Co-authored-by: Rogier 'DocWilco' Mulhuijzen <github@bsdchicks.com> Co-authored-by: scottbot95 <scottbot95@gmail.com>
- Loading branch information