Skip to content
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

[Core] Help Redesign #2628

Merged
merged 11 commits into from May 15, 2019

Conversation

@mikeshardmind
Copy link
Member

commented Apr 29, 2019

  • Creates a new Red specific help formatting paradigm.

  • Creates and uses a new Red specific help command

  • Modifies each of the following to use them:

    • redbot.core.commands.Context
    • redbot.core.bot.RedBase

This includes some behavior changes:

  • By default, commands which are not found will not raise an error.
    • This may still be shown with fuzzy help
  • Invoking help for a command you can't run will fail siltently
@DevilXD

This comment has been minimized.

Copy link
Contributor

commented Apr 30, 2019

Can there be a setting / command where one could set automatic deletion of help messages? Something along the lines of this help_autodelete cog for v2: https://cogs.red/cogs/ZeLarpMaster/ZeCogs/help_autodelete/, where a help response message is deleted along with the context message.

It does a really good job at cleaning up stray help messages people sometimes leave in not-so-frequently-visited channels.

@mikeshardmind

This comment has been minimized.

Copy link
Member Author

commented May 1, 2019

@DevilXD not in the initial conversion, but restructuring the help formatter like this is going to open up more easily adding such settings.

@Stonedestroyer

This comment has been minimized.

Copy link
Contributor

commented May 5, 2019

One request for this help-formatter would be an option either in permissions or in the help-formatter itself that you can decide to hide so people can not do help on commands they do not have permission on. The current iteration of help formatter does this but only on categories and overall menu and not specific single commands.

From PR: https://github.com/Cog-Creators/Red-DiscordBot/pull/2583 .

@mikeshardmind

This comment has been minimized.

Copy link
Member Author

commented May 5, 2019

@Stonedestroyer this should be the default behavior after the initial changes, with a setting exposed for this later on. Current work on this is intended to continue supporting settings we already have, while picking good defaults for remaining things for now, but in a way this can be changed later with additional settings.

After some further thought since discussion in your other PR, making the behavior consistent there by default is the right choice, and this is the best time to include that sort of change to the default behavior.

mikeshardmind added some commits May 10, 2019

[Commands] Update Cog and Group for help compat
- Removes a trap with all_commands, this isn't a good way to check this
- Adds a help property
- Fixes command parsing in invoke

@mikeshardmind mikeshardmind force-pushed the mikeshardmind:3.1-help-formatting branch 2 times, most recently May 10, 2019

@mikeshardmind mikeshardmind force-pushed the mikeshardmind:3.1-help-formatting branch to 8578478 May 11, 2019

@mikeshardmind mikeshardmind marked this pull request as ready for review May 11, 2019

@mikeshardmind mikeshardmind requested a review from Twentysix26 as a code owner May 11, 2019

@mikeshardmind mikeshardmind requested review from Tobotimus and tekulvw May 11, 2019

@mikeshardmind

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

This is ready for review.

There are a couple small behavior changes here regarding commands which users can't run or are hidden, (as well as similar changes surrounding commands not found), but these are only intended as defaults. Settings for these can be added, and the plan to allow more easily registered 3rd party formatters is still planned as far as I'm concerned.

The behavior changes are all centered around help being quiet by default when the user should have no direct knowledge of a command from the bot in that context.

@Stonedestroyer

This comment has been minimized.

Copy link
Contributor

commented May 11, 2019

Not sure if I messed something up but getting
raise AttributeError("'{}' is not a valid registered Group or value.".format(item)) AttributeError: 'max_pages_in_guild' is not a valid registered Group or value.

Edit: Disregard this, works on a clean venv.

@mikeshardmind

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

I need to fix something with the full bot help on this later, I seem to have overlooked a potential issue with it.

@mikeshardmind

This comment has been minimized.

Copy link
Member Author

commented May 13, 2019

PR is ready for use, fixed the bot specific issue which was overlooked.

This is now failing on a docs issue unrelated to this PR. discord.py removed a build from RTD in removing the rewrite branch.

mikeshardmind added some commits May 13, 2019

@mikeshardmind mikeshardmind requested a review from palmtree5 as a code owner May 14, 2019

@mikeshardmind mikeshardmind referenced this pull request May 15, 2019
1 of 6 tasks complete

@tekulvw tekulvw merged commit 7f1c2b4 into Cog-Creators:V3/develop May 15, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

kennnyshiwa pushed a commit to kennnyshiwa/BB-8-Bot that referenced this pull request May 15, 2019

Kennnyshiwa
[Core] Help Redesign (Cog-Creators#2628)
* [Bot] Support new design

* [Context] use the new help in `ctx.send_help`

* [Commands] Update Cog and Group for help compat

- Removes a trap with all_commands, this isn't a good way to check this
- Adds a help property
- Fixes command parsing in invoke

* Redesigns red's help

* handle fuzzy help

* style

* handle a specific ugly hidden interaction

* fix bot-wide help grouping

* changelog

* remove no longer needed -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.