From cfde28ad4bbea3dbc7008529c6957d8271507110 Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Sun, 3 Jul 2022 10:44:50 -0400 Subject: [PATCH] Removing errors in help_command.py. --- cogs/help/__init__.py | 7 +++++++ cogs/help/help_command.py | 8 ++++++-- cogs/register_highscore_channel/__init__.py | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cogs/help/__init__.py b/cogs/help/__init__.py index 31aeac1..ee7099b 100644 --- a/cogs/help/__init__.py +++ b/cogs/help/__init__.py @@ -1,9 +1,15 @@ +""" +Help command +""" + from nextcord.ext import commands from .help_command import NewHelpCommand class HelpCog(commands.Cog): + """Help Command""" + def __init__(self, bot: commands.Bot): self.bot = bot self._original_help_command = bot.help_command @@ -16,4 +22,5 @@ class HelpCog(commands.Cog): # setup functions for bot def setup(bot: commands.Bot): + """Adds functon to bot""" bot.add_cog(HelpCog(bot)) diff --git a/cogs/help/help_command.py b/cogs/help/help_command.py index 8634b78..859a0de 100644 --- a/cogs/help/help_command.py +++ b/cogs/help/help_command.py @@ -1,7 +1,11 @@ -import config +""" +Help command. Copied from discord-bot-template. +""" + import nextcord from nextcord.embeds import EmptyEmbed from nextcord.ext import commands +import config # pylint: disable=import-error class NewHelpCommand(commands.MinimalHelpCommand): @@ -28,7 +32,7 @@ class NewHelpCommand(commands.MinimalHelpCommand): if description: embed.description = description - for cog, commands in mapping.items(): + for cog, commands in mapping.items(): # pylint: disable=redefined-outer-name name = "No Category" if cog is None else cog.qualified_name filtered = await self.filter_commands(commands, sort=True) if filtered: diff --git a/cogs/register_highscore_channel/__init__.py b/cogs/register_highscore_channel/__init__.py index eb853f1..a698bae 100644 --- a/cogs/register_highscore_channel/__init__.py +++ b/cogs/register_highscore_channel/__init__.py @@ -15,7 +15,7 @@ class RegisterHighscoreChannel(commands.Cog, name="Register HighScore Channel"): @commands.command(name="register") async def register_highscores(self, ctx: commands.Context): - """A command which registers the channel command is sent in as channel to post highscores in. + """A command which registers current channel as channel to post highscores in. Usage: ``` ?register (in channel to post highscores in)