What "packages instead of modules" means is that the extension is an __init__.py of a sub-package i.e. the setup() function is in __init__.py (this is what watchchannels is doing right now).
The culprit is this code
|
if filename.endswith(".py") and "_" not in filename: |
It's just an overcomplicated and inaccurate way to accomplish this, especially since the Bot.extensions attribute exists (perhaps it didn't when this code was written).
What "packages instead of modules" means is that the extension is an
__init__.pyof a sub-package i.e. thesetup()function is in__init__.py(this is whatwatchchannelsis doing right now).The culprit is this code
bot/bot/cogs/cogs.py
Line 28 in 341fb52
It's just an overcomplicated and inaccurate way to accomplish this, especially since the
Bot.extensionsattribute exists (perhaps it didn't when this code was written).