Use bot.send_help_for in [p]alias help instead of "hacky way" (#3864)

* Use `bot.send_help_for` instead of this "hack" in `[p]alias help`

* This isn't needed here
This commit is contained in:
jack1142 2020-05-28 23:58:52 +02:00 committed by GitHub
parent ed89f70f98
commit a9acb80132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,14 +258,7 @@ class Alias(commands.Cog):
"""Try to execute help for the base command of the alias.""" """Try to execute help for the base command of the alias."""
alias = await self._aliases.get_alias(ctx.guild, alias_name=alias_name) alias = await self._aliases.get_alias(ctx.guild, alias_name=alias_name)
if alias: if alias:
if self.is_command(alias.command): await self.bot.send_help_for(ctx, alias.command)
base_cmd = alias.command
else:
base_cmd = alias.command.rsplit(" ", 1)[0]
new_msg = copy(ctx.message)
new_msg.content = f"{ctx.prefix}help {base_cmd}"
await self.bot.process_commands(new_msg)
else: else:
await ctx.send(_("No such alias exists.")) await ctx.send(_("No such alias exists."))