Updating help command

This commit is contained in:
Rafael Vargas 2021-12-30 19:30:37 -04:00
parent 7bfb098b54
commit c9a729c4cc

View File

@ -10,10 +10,11 @@ class Control(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.__bot = bot self.__bot = bot
self.__comandos = { self.__comandos = {
'MUSIC': ['this', 'resume', 'pause', 'loop', 'stop', 'skip', 'play', 'queue', 'clear', 'np'], 'MUSIC': ['resume', 'pause', 'loop', 'stop', 'skip', 'play', 'queue', 'clear', 'np', 'shuffle', 'move'],
'WARFRAME': ['warframe'],
'RANDOM': ['escolha', 'cara', 'random'], 'RANDOM': ['escolha', 'cara', 'random'],
'HELP': ['help'], 'HELP': ['help'],
'OTHERS': ['cetus', 'frase'] 'OTHERS': ['frase']
} }
@property @property
@ -44,6 +45,7 @@ class Control(commands.Cog):
helptxt = '' helptxt = ''
help_music = '-- MUSIC\n' help_music = '-- MUSIC\n'
help_random = '-- RANDOM\n' help_random = '-- RANDOM\n'
help_warframe = '-- WARFRAME\n'
help_help = '-- HELP\n' help_help = '-- HELP\n'
help_others = '-- OTHERS\n' help_others = '-- OTHERS\n'
@ -54,10 +56,12 @@ class Control(commands.Cog):
help_help += f'**{command}** - {command.help}\n' help_help += f'**{command}** - {command.help}\n'
elif command.name in self.__comandos['OTHERS']: elif command.name in self.__comandos['OTHERS']:
help_others += f'**{command}** - {command.help}\n' help_others += f'**{command}** - {command.help}\n'
elif command.name in self.__comandos['WARFRAME']:
help_warframe += f'**{command}** - {command.help}\n'
else: else:
help_random += f'**{command}** - {command.help}\n' help_random += f'**{command}** - {command.help}\n'
helptxt = f'{help_music}\n{help_random}\n{help_others}\n{help_help}' helptxt = f'{help_music}\n{help_warframe}\n{help_random}\n{help_others}\n{help_help}'
embedhelp = discord.Embed( embedhelp = discord.Embed(
colour=config.COLOURS['grey'], colour=config.COLOURS['grey'],
@ -68,10 +72,6 @@ class Control(commands.Cog):
embedhelp.set_thumbnail(url=self.__bot.user.avatar_url) embedhelp.set_thumbnail(url=self.__bot.user.avatar_url)
await ctx.send(embed=embedhelp) await ctx.send(embed=embedhelp)
@commands.Cog.listener()
async def on_error(self, error):
print('On Error')
def setup(bot): def setup(bot):
bot.add_cog(Control(bot)) bot.add_cog(Control(bot))