How to use
The first step is to let the extension know which class is the cog.
Suppose the cog subclass is defined as FooCog,
class FooCog(commands.Cog):
pass
You should name the file, foo_cog.py
The module will then convert snake_case to PascalCase and then try to import the cog to load it. The module will try to pass the bot instance to it so be sure to accept it in the constructor,
class FooCog(commands.Cog):
def __init__(self, bot: commands.Bot):
...
disnake.ext.loader.Loader accepts two parameters, bot and folder_name.
bot- The
commands.Botinstance to load cogs.
- The
folder_name- The folder where the cogs are located. You may also enter something like
ext.cogsif the cogs folder is inside a folder namedext.
- The folder where the cogs are located. You may also enter something like
Metadata
Release files for disnake-cog-loader 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| disnake-cog-loader-0.0.3.tar.gz | 2.3 kB | Without provenance | Details for disnake-cog-loader-0.0.3.tar.gz |
Release files / disnake-cog-loader-0.0.3.tar.gz
| Download URL | disnake-cog-loader-0.0.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d1b8b77b03dcf1889be9a4320d4187ba4494c75c097272e8bd3a29e0334e279
|
|
BLAKE2b-256 checksum How to use checksums |
00bdae229fe89e4d8b81c806d54dc2062f437f8ff64d38c8d504c95ea24d7585
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
|
Security for disnake-cog-loader 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.