diff options
| author | Rapptz <[email protected]> | 2017-07-19 05:14:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-07-19 05:14:23 -0400 |
| commit | a7f846b37fadbe21cc4a834359bbcbe9a76f2f0a (patch) | |
| tree | d3a43696e07d8760ae79030d802d5e08dc631395 | |
| parent | Add some logging for when ffmpeg processes get terminated. (diff) | |
| download | discord.py-a7f846b37fadbe21cc4a834359bbcbe9a76f2f0a.tar.xz discord.py-a7f846b37fadbe21cc4a834359bbcbe9a76f2f0a.zip | |
[commands] Fix Command.root_parent not properly working.
| -rw-r--r-- | discord/ext/commands/core.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index d7e562d5..0f75d36a 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -305,8 +305,10 @@ class Command: while command.parent is not None: command = command.parent entries.append(command) - entries.append(None) - entries.reverse() + + if len(entries) == 0: + return None + return entries[-1] @property |