aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-07-19 05:14:23 -0400
committerRapptz <[email protected]>2017-07-19 05:14:23 -0400
commita7f846b37fadbe21cc4a834359bbcbe9a76f2f0a (patch)
treed3a43696e07d8760ae79030d802d5e08dc631395
parentAdd some logging for when ffmpeg processes get terminated. (diff)
downloaddiscord.py-a7f846b37fadbe21cc4a834359bbcbe9a76f2f0a.tar.xz
discord.py-a7f846b37fadbe21cc4a834359bbcbe9a76f2f0a.zip
[commands] Fix Command.root_parent not properly working.
-rw-r--r--discord/ext/commands/core.py6
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