[Core Commands] Add Help settings view (#4022)

* add help settings view

* Update redbot/core/commands/help.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* natural language handling of time intervals is useful

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Michael H
2020-08-05 21:38:34 -04:00
committed by GitHub
parent 29543ed118
commit 068ce24513
2 changed files with 55 additions and 2 deletions

View File

@@ -2079,6 +2079,23 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
"""Manage settings for the help command."""
pass
@helpset.command(name="showsettings")
async def helpset_showsettings(self, ctx: commands.Context):
""" Show the current help settings """
help_settings = await commands.help.HelpSettings.from_context(ctx)
if type(ctx.bot._help_formatter) is commands.help.RedHelpFormatter:
message = help_settings.pretty
else:
message = _(
"Warning: The default formatter is not in use, these settings may not apply"
)
message += f"\n\n{help_settings.pretty}"
for page in pagify(message):
await ctx.send(page)
@helpset.command(name="resetformatter")
async def helpset_resetformatter(self, ctx: commands.Context):
""" This resets [botname]'s help formatter to the default formatter """