- class redbot.core.cog_manager.CogManager¶
Directory manager for Red’s cogs.
This module allows you to load cogs from multiple directories and even from outside the bot directory. You may also set a directory for downloader to install new cogs to, the default being the
cogs/folder in the root bot directory.
- await add_path(path)¶
Add a cog path to current list.
This will ignore duplicates.
- await available_modules()¶
Finds the names of all available modules to load.
- await find_cog(name)¶
Find a cog in the list of available paths.
- await install_path()¶
Get the install path for 3rd party cogs.
The path to the directory where 3rd party cogs are stored.
- Return type
- staticmethod invalidate_caches()¶
Re-evaluate modules in the py cache.
This is an alias for an importlib internal and should be called any time that a new module has been installed to a cog directory.
- await paths()¶
Get all currently valid path directories, in order of priority
A list of paths where cog packages can be found. The install path is highest priority, followed by the user-defined paths, and the core path has the lowest priority.
- Return type
- await remove_path(path)¶
Remove a path from the current paths list.
- await set_install_path(path)¶
Set the install path for 3rd party cogs.
The bot will not remember your old cog install path which means that all previously installed cogs will no longer be found.
- await set_paths(paths_)¶
Set the current paths list.