mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Fix KeyError constructing groups when no module is present
This commit is contained in:
parent
64744a4938
commit
2d180489ce
@ -1577,7 +1577,7 @@ class Group:
|
||||
# This is pretty hacky
|
||||
# It allows the module to be fetched if someone just constructs a bare Group object though.
|
||||
self.module = inspect.currentframe().f_back.f_globals['__name__'] # type: ignore
|
||||
except (AttributeError, IndexError):
|
||||
except (AttributeError, IndexError, KeyError):
|
||||
self.module = None
|
||||
|
||||
self._children: Dict[str, Union[Command, Group]] = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user