Removing errors in help_command.py.
This commit is contained in:
@@ -1,9 +1,15 @@
|
|||||||
|
"""
|
||||||
|
Help command
|
||||||
|
"""
|
||||||
|
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
|
||||||
from .help_command import NewHelpCommand
|
from .help_command import NewHelpCommand
|
||||||
|
|
||||||
|
|
||||||
class HelpCog(commands.Cog):
|
class HelpCog(commands.Cog):
|
||||||
|
"""Help Command"""
|
||||||
|
|
||||||
def __init__(self, bot: commands.Bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self._original_help_command = bot.help_command
|
self._original_help_command = bot.help_command
|
||||||
@@ -16,4 +22,5 @@ class HelpCog(commands.Cog):
|
|||||||
|
|
||||||
# setup functions for bot
|
# setup functions for bot
|
||||||
def setup(bot: commands.Bot):
|
def setup(bot: commands.Bot):
|
||||||
|
"""Adds functon to bot"""
|
||||||
bot.add_cog(HelpCog(bot))
|
bot.add_cog(HelpCog(bot))
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
import config
|
"""
|
||||||
|
Help command. Copied from discord-bot-template.
|
||||||
|
"""
|
||||||
|
|
||||||
import nextcord
|
import nextcord
|
||||||
from nextcord.embeds import EmptyEmbed
|
from nextcord.embeds import EmptyEmbed
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
import config # pylint: disable=import-error
|
||||||
|
|
||||||
|
|
||||||
class NewHelpCommand(commands.MinimalHelpCommand):
|
class NewHelpCommand(commands.MinimalHelpCommand):
|
||||||
@@ -28,7 +32,7 @@ class NewHelpCommand(commands.MinimalHelpCommand):
|
|||||||
if description:
|
if description:
|
||||||
embed.description = 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
|
name = "No Category" if cog is None else cog.qualified_name
|
||||||
filtered = await self.filter_commands(commands, sort=True)
|
filtered = await self.filter_commands(commands, sort=True)
|
||||||
if filtered:
|
if filtered:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class RegisterHighscoreChannel(commands.Cog, name="Register HighScore Channel"):
|
|||||||
|
|
||||||
@commands.command(name="register")
|
@commands.command(name="register")
|
||||||
async def register_highscores(self, ctx: commands.Context):
|
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:
|
Usage:
|
||||||
```
|
```
|
||||||
?register (in channel to post highscores in)
|
?register (in channel to post highscores in)
|
||||||
|
|||||||
Reference in New Issue
Block a user