aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/ext/commands/core.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 6b9b3c9e..30e110da 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -1015,6 +1015,10 @@ class GroupMixin:
The command that was requested. If not found, returns ``None``.
"""
+ # fast path, no space in name.
+ if ' ' not in name:
+ return self.all_commands.get(name)
+
names = name.split()
obj = self.all_commands.get(names[0])
if not isinstance(obj, GroupMixin):