1
0
Fork 0
mirror of synced 2024-06-03 11:14:33 +12:00

Corrected issue were aliases were still detected on child commands

This commit is contained in:
Phxntxm 2016-12-01 22:59:59 -06:00
parent dd3405141b
commit 49bd09fc52

View file

@ -15,7 +15,8 @@ def get_all_commands(bot):
def _get_all_commands(command):
yield command.qualified_name
try:
for cmd in command.commands.values():
yield from _get_all_commands(cmd)
non_aliases = set(cmd.qualified_name for cmd in command.commands.values())
for cmd_name in non_aliases:
yield from _get_all_commands(command.commands[cmd_name])
except AttributeError:
pass