aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack1142 <[email protected]>2020-07-12 18:31:51 +0200
committerRapptz <[email protected]>2020-07-22 23:16:43 -0400
commit901290c8a2adae13692de2e877db130cf0b842f6 (patch)
treecc19b6e0f44d6f6f597e47ea3038bc2f17e9550d
parentAdded exception documentation for Guild.create_voice_channel (diff)
downloaddiscord.py-901290c8a2adae13692de2e877db130cf0b842f6.tar.xz
discord.py-901290c8a2adae13692de2e877db130cf0b842f6.zip
[commands] GroupView.get_command shouldn't raise errors for empty names
-rw-r--r--discord/ext/commands/core.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 6af99622..ea67ea71 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -1180,6 +1180,8 @@ class GroupMixin:
return self.all_commands.get(name)
names = name.split()
+ if not names:
+ return None
obj = self.all_commands.get(names[0])
if not isinstance(obj, GroupMixin):
return obj