Metadata-Version: 2.1
Name: disnake-cog-loader
Version: 0.0.3
Summary: An extension module for disnake to load cogs without needing the setup function.
Home-page: https://github.com/m-y-x-i/disnake-cog-loader
Author: Myxi
License: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown

# 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`,
```py
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,

```py
class FooCog(commands.Cog):
    def __init__(self, bot: commands.Bot):
        ...
```

`disnake.ext.loader.Loader` accepts two parameters, `bot` and `folder_name`.

- `bot`
    - The `commands.Bot` instance to load cogs.
- `folder_name`
    - The folder where the cogs are located. You may also enter something like `ext.cogs` if the cogs folder is inside a folder named `ext`.


