mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Alias] Fix alias help (#2194)
Alias help would only return the first character of the invoked command previously. This change shows help for basic commands that are aliased (i.e. just `ping`) or aliased commands that have an argument included (i.e. `audioset role beep` with `beep` being a role name)
This commit is contained in:
parent
76bbcf2f8c
commit
46c38a28eb
@ -288,7 +288,10 @@ class Alias(commands.Cog):
|
||||
"""Try to execute help for the base command of the alias."""
|
||||
is_alias, alias = await self.is_alias(ctx.guild, alias_name=alias_name)
|
||||
if is_alias:
|
||||
base_cmd = alias.command[0]
|
||||
if self.is_command(alias.command):
|
||||
base_cmd = alias.command
|
||||
else:
|
||||
base_cmd = alias.command.rsplit(" ", 1)[0]
|
||||
|
||||
new_msg = copy(ctx.message)
|
||||
new_msg.content = _("{prefix}help {command}").format(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user