Merge pull request #3 from ReperakPro/main

Minor help command improvements
This commit is contained in:
Elmon11 2021-01-17 01:40:54 +01:00 committed by GitHub
commit bb7abf585d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,8 +14,10 @@ class Help(commands.Cog):
@commands.command(aliases=['h', '?']) @commands.command(aliases=['h', '?'])
async def help(self, ctx, page=1): async def help(self, ctx, page=1):
"""Displays the help command""" """Displays the help command"""
em = discord.Embed() em = discord.Embed(
em.title = 'Help Command' title='Help Command',
colour=0x00FF00,
)
cog_list = [c for c in self.bot.cogs.keys()] cog_list = [c for c in self.bot.cogs.keys()]
page_count = math.ceil(len(cog_list) / 4) page_count = math.ceil(len(cog_list) / 4)
@ -36,9 +38,7 @@ class Help(commands.Cog):
command_list = '' command_list = ''
for command in self.bot.get_cog(cog).get_commands(): for command in self.bot.get_cog(cog).get_commands():
showcommand = True showcommand = True
if command.hidden: if command.hidden or command.parent:
showcommand = False
if command.parent:
showcommand = False showcommand = False
for check in command.checks: for check in command.checks:
try: try: