Removing errors in help_command.py.

This commit is contained in:
alwayscompiling
2022-07-03 10:47:06 -04:00
parent f23cd71647
commit cfde28ad4b
3 changed files with 14 additions and 3 deletions
+7
View File
@@ -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))
+6 -2
View File
@@ -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:
+1 -1
View File
@@ -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)