[commands] Allow loading cogs from folders.
Internally, instead of using module objects just use the `__module__` attribute which is the same thing. From preliminary testing this seems to work fine with both regular one-file-per-cog approaches and the folder cog approach. Fixes #126.
This commit is contained in:
@@ -155,7 +155,7 @@ class Command:
|
||||
signature = inspect.signature(callback)
|
||||
self.params = signature.parameters.copy()
|
||||
self.checks = kwargs.get('checks', [])
|
||||
self.module = inspect.getmodule(callback)
|
||||
self.module = callback.__module__
|
||||
self.ignore_extra = kwargs.get('ignore_extra', True)
|
||||
self.instance = None
|
||||
self.parent = None
|
||||
|
||||
Reference in New Issue
Block a user