From 1c2196f78f00944e071900ad384b9acb6ce236a0 Mon Sep 17 00:00:00 2001 From: Michael H Date: Wed, 11 Jul 2018 19:23:18 -0400 Subject: [PATCH] autohelp changes. (#1836) --- redbot/cogs/admin/admin.py | 2 +- redbot/cogs/alias/alias.py | 4 ++-- redbot/cogs/audio/audio.py | 6 +++--- redbot/cogs/bank/bank.py | 2 +- redbot/cogs/cleanup/cleanup.py | 2 +- redbot/cogs/customcom/customcom.py | 4 ++-- redbot/cogs/downloader/downloader.py | 4 ++-- redbot/cogs/economy/economy.py | 4 ++-- redbot/cogs/filter/filter.py | 2 +- redbot/cogs/image/image.py | 2 +- redbot/cogs/mod/mod.py | 10 +++++----- redbot/cogs/modlog/modlog.py | 2 +- redbot/cogs/permissions/permissions.py | 2 +- redbot/cogs/reports/reports.py | 2 +- redbot/cogs/streams/streams.py | 8 ++++---- redbot/cogs/trivia/trivia.py | 2 +- redbot/cogs/warnings/warnings.py | 6 +++--- redbot/core/commands/commands.py | 2 +- redbot/core/core_commands.py | 10 +++++----- 19 files changed, 38 insertions(+), 38 deletions(-) diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py index a513027cd..062d1f61c 100644 --- a/redbot/cogs/admin/admin.py +++ b/redbot/cogs/admin/admin.py @@ -156,7 +156,7 @@ class Admin: else: await self.complain(ctx, USER_HIERARCHY_ISSUE) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.admin_or_permissions(manage_roles=True) async def editrole(self, ctx: commands.Context): diff --git a/redbot/cogs/alias/alias.py b/redbot/cogs/alias/alias.py index 7df6a6cda..3c88da198 100644 --- a/redbot/cogs/alias/alias.py +++ b/redbot/cogs/alias/alias.py @@ -170,13 +170,13 @@ class Alias: new_message.content = "{}{} {}".format(prefix, alias.command, args) await self.bot.process_commands(new_message) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() async def alias(self, ctx: commands.Context): """Manage per-server aliases for commands""" pass - @alias.group(name="global", autohelp=True) + @alias.group(name="global") async def global_(self, ctx: commands.Context): """ Manage global aliases. diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index 6c786693f..34cf2b7fa 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -166,7 +166,7 @@ class Audio: await message_channel.send(embed=embed) await player.skip() - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() async def audioset(self, ctx): """Music configuration options.""" @@ -657,7 +657,7 @@ class Audio: await player.play() await ctx.send(embed=embed) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() async def playlist(self, ctx): """Playlist configuration options.""" @@ -1622,7 +1622,7 @@ class Audio: embed.set_footer(text="Nothing playing.") await ctx.send(embed=embed) - @commands.group(aliases=["llset"], autohelp=True) + @commands.group(aliases=["llset"]) @commands.guild_only() @checks.is_owner() async def llsetup(self, ctx): diff --git a/redbot/cogs/bank/bank.py b/redbot/cogs/bank/bank.py index 13e5616f0..f81916cc5 100644 --- a/redbot/cogs/bank/bank.py +++ b/redbot/cogs/bank/bank.py @@ -58,7 +58,7 @@ class Bank: # SECTION commands - @commands.group(autohelp=True) + @commands.group() @checks.guildowner_or_permissions(administrator=True) async def bankset(self, ctx: commands.Context): """Base command for bank settings""" diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index af8c3b584..a31260519 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -92,7 +92,7 @@ class Cleanup: before = message return to_delete - @commands.group(autohelp=True) + @commands.group() @checks.mod_or_permissions(manage_messages=True) async def cleanup(self, ctx: commands.Context): """Deletes messages.""" diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index e8dc6baba..b2a8b9a62 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -141,13 +141,13 @@ class CustomCommands: self.config.register_guild(commands={}) self.commandobj = CommandObj(config=self.config, bot=self.bot) - @commands.group(aliases=["cc"], autohelp=True) + @commands.group(aliases=["cc"]) @commands.guild_only() async def customcom(self, ctx: commands.Context): """Custom commands management""" pass - @customcom.group(name="add", autohelp=True) + @customcom.group(name="add") @checks.mod_or_permissions(administrator=True) async def cc_add(self, ctx: commands.Context): """ diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index f9d3090a6..e10d102e7 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -204,7 +204,7 @@ class Downloader: ) ) - @commands.group(autohelp=True) + @commands.group() @checks.is_owner() async def repo(self, ctx): """ @@ -272,7 +272,7 @@ class Downloader: msg = _("Information on {}:\n{}").format(repo_name.name, repo_name.description or "") await ctx.send(box(msg)) - @commands.group(autohelp=True) + @commands.group() @checks.is_owner() async def cog(self, ctx): """ diff --git a/redbot/cogs/economy/economy.py b/redbot/cogs/economy/economy.py index 4bcea4914..151fd58a9 100644 --- a/redbot/cogs/economy/economy.py +++ b/redbot/cogs/economy/economy.py @@ -137,7 +137,7 @@ class Economy: self.config.register_role(**self.default_role_settings) self.slot_register = defaultdict(dict) - @commands.group(name="bank", autohelp=True) + @commands.group(name="bank") async def _bank(self, ctx: commands.Context): """Bank operations""" pass @@ -438,7 +438,7 @@ class Economy: ) ) - @commands.group(autohelp=True) + @commands.group() @guild_only_check() @check_global_setting_admin() async def economyset(self, ctx: commands.Context): diff --git a/redbot/cogs/filter/filter.py b/redbot/cogs/filter/filter.py index 4061c101f..e8a4aa4e5 100644 --- a/redbot/cogs/filter/filter.py +++ b/redbot/cogs/filter/filter.py @@ -39,7 +39,7 @@ class Filter: except RuntimeError: pass - @commands.group(name="filter", autohelp=True) + @commands.group(name="filter") @commands.guild_only() @checks.mod_or_permissions(manage_messages=True) async def _filter(self, ctx: commands.Context): diff --git a/redbot/cogs/image/image.py b/redbot/cogs/image/image.py index 617ed4f14..934cdc4f4 100644 --- a/redbot/cogs/image/image.py +++ b/redbot/cogs/image/image.py @@ -26,7 +26,7 @@ class Image: def __unload(self): self.session.close() - @commands.group(name="imgur", autohelp=True) + @commands.group(name="imgur") async def _imgur(self, ctx): """Retrieves pictures from imgur diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py index 1ce07940d..ad2addf09 100644 --- a/redbot/cogs/mod/mod.py +++ b/redbot/cogs/mod/mod.py @@ -161,7 +161,7 @@ class Mod: except RuntimeError: pass - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.guildowner_or_permissions(administrator=True) async def modset(self, ctx: commands.Context): @@ -832,7 +832,7 @@ class Mod: _("I cannot do that, I lack the '{}' permission.").format("Manage Nicknames") ) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.mod_or_permissions(manage_channel=True) async def mute(self, ctx: commands.Context): @@ -998,7 +998,7 @@ class Mod: await self.settings.member(user).perms_cache.set(perms_cache) return True, None - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.mod_or_permissions(manage_channel=True) async def unmute(self, ctx: commands.Context): @@ -1164,7 +1164,7 @@ class Mod: await self.settings.member(user).perms_cache.set(perms_cache) return True, None - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.admin_or_permissions(manage_channels=True) async def ignore(self, ctx: commands.Context): @@ -1196,7 +1196,7 @@ class Mod: else: await ctx.send(_("This server is already being ignored.")) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.admin_or_permissions(manage_channels=True) async def unignore(self, ctx: commands.Context): diff --git a/redbot/cogs/modlog/modlog.py b/redbot/cogs/modlog/modlog.py index 418ae451a..a79f9656d 100644 --- a/redbot/cogs/modlog/modlog.py +++ b/redbot/cogs/modlog/modlog.py @@ -15,7 +15,7 @@ class ModLog: def __init__(self, bot: Red): self.bot = bot - @commands.group(autohelp=True) + @commands.group() @checks.guildowner_or_permissions(administrator=True) async def modlogset(self, ctx: commands.Context): """Settings for the mod log""" diff --git a/redbot/cogs/permissions/permissions.py b/redbot/cogs/permissions/permissions.py index 66fc729d1..340acbea5 100644 --- a/redbot/cogs/permissions/permissions.py +++ b/redbot/cogs/permissions/permissions.py @@ -125,7 +125,7 @@ class Permissions: # async def admin_model(self, ctx: commands.Context) -> bool: # async def mod_model(self, ctx: commands.Context) -> bool: - @commands.group(aliases=["p"], autohelp=True) + @commands.group(aliases=["p"]) async def permissions(self, ctx: commands.Context): """ Permission management tools diff --git a/redbot/cogs/reports/reports.py b/redbot/cogs/reports/reports.py index c5721fc43..2f17fa3f2 100644 --- a/redbot/cogs/reports/reports.py +++ b/redbot/cogs/reports/reports.py @@ -56,7 +56,7 @@ class Reports: @checks.admin_or_permissions(manage_guild=True) @commands.guild_only() - @commands.group(name="reportset", autohelp=True) + @commands.group(name="reportset") async def reportset(self, ctx: commands.Context): """ settings for reports diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index 40a4d66a7..1dd6bee58 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -135,13 +135,13 @@ class Streams: else: await ctx.send(embed=embed) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.mod() async def streamalert(self, ctx: commands.Context): pass - @streamalert.group(name="twitch", autohelp=True) + @streamalert.group(name="twitch") async def _twitch(self, ctx: commands.Context): """Twitch stream alerts""" pass @@ -294,7 +294,7 @@ class Streams: await self.add_or_remove_community(ctx, community) - @commands.group(autohelp=True) + @commands.group() @checks.mod() async def streamset(self, ctx: commands.Context): pass @@ -333,7 +333,7 @@ class Streams: await self.db.tokens.set_raw("YoutubeStream", value=key) await ctx.send(_("Youtube key set.")) - @streamset.group(autohelp=True) + @streamset.group() @commands.guild_only() async def mention(self, ctx: commands.Context): """Sets mentions for stream alerts.""" diff --git a/redbot/cogs/trivia/trivia.py b/redbot/cogs/trivia/trivia.py index 582bb75c2..9d53b1878 100644 --- a/redbot/cogs/trivia/trivia.py +++ b/redbot/cogs/trivia/trivia.py @@ -41,7 +41,7 @@ class Trivia: self.conf.register_member(wins=0, games=0, total_score=0) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.mod_or_permissions(administrator=True) async def triviaset(self, ctx: commands.Context): diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py index e29ac57fd..1284ad1c0 100644 --- a/redbot/cogs/warnings/warnings.py +++ b/redbot/cogs/warnings/warnings.py @@ -41,7 +41,7 @@ class Warnings: except RuntimeError: pass - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.guildowner_or_permissions(administrator=True) async def warningset(self, ctx: commands.Context): @@ -58,7 +58,7 @@ class Warnings: _("Custom reasons have been {}.").format(_("enabled") if allowed else _("disabled")) ) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.guildowner_or_permissions(administrator=True) async def warnaction(self, ctx: commands.Context): @@ -134,7 +134,7 @@ class Warnings: else: await ctx.send(_("No action named {} exists!").format(action_name)) - @commands.group(autohelp=True) + @commands.group() @commands.guild_only() @checks.guildowner_or_permissions(administrator=True) async def warnreason(self, ctx: commands.Context): diff --git a/redbot/core/commands/commands.py b/redbot/core/commands/commands.py index b9e7a67c8..048aed1e3 100644 --- a/redbot/core/commands/commands.py +++ b/redbot/core/commands/commands.py @@ -137,7 +137,7 @@ class Group(Command, commands.Group): """ def __init__(self, *args, **kwargs): - self.autohelp = kwargs.pop("autohelp", False) + self.autohelp = kwargs.pop("autohelp", True) super().__init__(*args, **kwargs) async def invoke(self, ctx): diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 824c905c6..d877139a4 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -321,7 +321,7 @@ class Core(CoreLogic): return fmt.format(d=days, h=hours, m=minutes, s=seconds) - @commands.group(autohelp=True) + @commands.group() async def embedset(self, ctx: commands.Context): """ Commands for toggling embeds on or off. @@ -598,7 +598,7 @@ class Core(CoreLogic): pass await ctx.bot.shutdown(restart=True) - @commands.group(name="set", autohelp=True) + @commands.group(name="set") async def _set(self, ctx): """Changes Red's settings""" if ctx.invoked_subcommand is None: @@ -981,7 +981,7 @@ class Core(CoreLogic): ctx.bot.disable_sentry() await ctx.send(_("Done. Sentry logging is now disabled.")) - @commands.group(autohelp=True) + @commands.group() @checks.is_owner() async def helpset(self, ctx: commands.Context): """Manage settings for the help command.""" @@ -1264,7 +1264,7 @@ class Core(CoreLogic): else: await ctx.send(_("Message delivered to {}").format(destination)) - @commands.group(autohelp=True) + @commands.group() @checks.is_owner() async def whitelist(self, ctx): """ @@ -1322,7 +1322,7 @@ class Core(CoreLogic): await ctx.bot.db.whitelist.set([]) await ctx.send(_("Whitelist has been cleared.")) - @commands.group(autohelp=True) + @commands.group() @checks.is_owner() async def blacklist(self, ctx): """