erin.core package¶
Submodules¶
erin.core.exceptions module¶
-
exception
erin.core.exceptions.
CoreError
[source]¶ Bases:
Exception
Base exception class for Core modules and internal use
-
exception
erin.core.exceptions.
DatabaseError
[source]¶ Bases:
erin.core.exceptions.CoreError
Error raised when a database operation fails.
-
exception
erin.core.exceptions.
DatabaseKeyError
(message)[source]¶ Bases:
erin.core.exceptions.DatabaseError
Raised when an attempt to fetch from the key value store fails.
-
exception
erin.core.exceptions.
DatabaseTypeError
(message)[source]¶ Bases:
erin.core.exceptions.DatabaseError
Raised when parameters passed are incorrect.
-
exception
erin.core.exceptions.
EnvironmentVariableError
(message)[source]¶ Bases:
erin.core.exceptions.UserError
Error raised when an environment variable is not configured properly.
-
exception
erin.core.exceptions.
PluginError
[source]¶ Bases:
Exception
Base exception class for plugin errors
-
exception
erin.core.exceptions.
PluginNotFoundError
(path, message=None)[source]¶ Bases:
erin.core.exceptions.PluginError
,FileNotFoundError
Raised when a plugin path is requested but doesn’t exist. Corresponds to errno ENOENT.
-
exception
erin.core.exceptions.
PrimaryKeyError
(message)[source]¶ Bases:
erin.core.exceptions.DatabaseError
Raised when there is either a primary key is missing or required.
-
exception
erin.core.exceptions.
RecordExistsError
(message)[source]¶ Bases:
erin.core.exceptions.DatabaseError
Raised when a record already exists.
-
exception
erin.core.exceptions.
TableNotFoundError
(message)[source]¶ Bases:
erin.core.exceptions.DatabaseError
Raised when a table is missing.
erin.core.schema module¶
erin.core.utils module¶
-
erin.core.utils.
find_plugins
(package) → List[str][source]¶ Finds all top level subpackages in a package and presents them in the format required by
discord.ext.cli.Bot.load_extension()
.This is useful when you need to load cogs from multiple areas of your bot. Simply convert your cogs directory into a package and run this method on it.
Parameters: package (package) – Your package as a python package or a path to one. Note: All packages are modules, all modules are not packages. Returns: A list of strings of format foo.bar as required by discord.ext.cli.Bot.load_extension()
. If package passed is not valid then None is returned instead.Return type: list or None