-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade poise current to include poise next and serenity-next #224
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GnomedDev
force-pushed
the
next-on-current
branch
from
November 24, 2023 14:19
42f36dd
to
7e5743e
Compare
kangalio
reviewed
Nov 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would have been easier to review with the "merge next into current" and "port to serenity 0.12" split into two PRs, but it's ok
kangalio
reviewed
Nov 26, 2023
GnomedDev
force-pushed
the
next-on-current
branch
from
November 26, 2023 17:10
7e5743e
to
356eb73
Compare
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
...and rename AutocompleteChoice.name to label (I think it fits better)
* 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>
serenity-rs#161 changed single help command to include description. This commit makes it optional (but keeps the new behavior as default)
- 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
* Refinements to builtins::help * Make rustfmt happy * Make MSRV happy --------- Co-authored-by: Rogier 'DocWilco' Mulhuijzen <github@bsdchicks.com>
GnomedDev
force-pushed
the
next-on-current
branch
5 times, most recently
from
November 28, 2023 13:17
68642b8
to
61ea023
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Discussed on discord.