Data manager is a module that handles all the information necessary to bootstrap the bot into a state where more abstract data management systems can take over.
Creates a default instance for Red, so it can be ran without creating an instance.
The data of this instance will be removed on next system restart.
Loads the basic bootstrap configuration necessary for
Configto know where to store or look for data.
It is necessary to call this function BEFORE getting any
Parameters: instance_name_ (str) – The instance name given by CLI argument and created during redbot setup.
Gets the base cog data path. If you want to get the folder with which to store your own cog’s data please pass in an instance of your cog class.
raw_namewill be used, not both.
- cog_instance – The instance of the cog you wish to get a data path for.
If calling from a command or method of your cog, this should be
- raw_name (str) – The name of the cog to get a data path for.
cog_instanceis provided it will return a path to a folder dedicated to a given cog. Otherwise it will return a path to the folder that contains data for all cogs.
- cog_instance – The instance of the cog you wish to get a data path for. If calling from a command or method of your cog, this should be
Get the path to the “data” directory bundled with this cog.
The bundled data folder must be located alongside the
.pyfile which contains the cog class.
You should NEVER write to this directory.
Parameters: cog_instance – An instance of your cog. If calling from a command or method of your cog, this should be
Returns: Path object to the bundled data folder. Return type: pathlib.Path Raises: FileNotFoundError – If no bundled data folder exists.
Gets any details necessary for config drivers to load.
These are set on setup.
Returns: Storage details. Return type: dict