mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
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:
parent
ed89f70f98
commit
a9acb80132
@ -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."))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user