mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-04 01:00:00 +00:00
[commands] Force HybridGroup to always have invoke_without_command
This commit is contained in:
parent
49f330b4a3
commit
7a52aa3764
@ -429,6 +429,8 @@ class HybridGroup(Group[CogT, P, T]):
|
|||||||
Note that application commands groups cannot have callbacks associated with them, so the callback
|
Note that application commands groups cannot have callbacks associated with them, so the callback
|
||||||
is only called if it's not invoked as an application command.
|
is only called if it's not invoked as an application command.
|
||||||
|
|
||||||
|
Hybrid groups will always have :attr:`invoke_without_command` set to ``True``.
|
||||||
|
|
||||||
These are not created manually, instead they are created via the
|
These are not created manually, instead they are created via the
|
||||||
decorator or functional interface.
|
decorator or functional interface.
|
||||||
|
|
||||||
@ -439,6 +441,7 @@ class HybridGroup(Group[CogT, P, T]):
|
|||||||
|
|
||||||
def __init__(self, *args: Any, **attrs: Any) -> None:
|
def __init__(self, *args: Any, **attrs: Any) -> None:
|
||||||
super().__init__(*args, **attrs)
|
super().__init__(*args, **attrs)
|
||||||
|
self.invoke_without_command = True
|
||||||
parent = None
|
parent = None
|
||||||
if self.parent is not None:
|
if self.parent is not None:
|
||||||
if isinstance(self.parent, HybridGroup):
|
if isinstance(self.parent, HybridGroup):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user