Metadata-Version: 2.1
Name: pycord-multicog
Version: 1.0.2
Summary: A pycord extension that allows splitting command groups into multiple cogs
Home-page: https://github.com/Dorukyum/pycord-multicog
Author: Dorukyum
License: MIT
Project-URL: Source, https://github.com/Dorukyum/pycord-multicog
Keywords: Pycord
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# pycord-multicog
A pycord extension that allows splitting command groups into multiple cogs.

## Installation
```sh
$ pip install pycord-multicog
```

## Usage
### Creating cogs
```py
# cog number 1, a normal cog with a slash command group
class Cog1(Cog):
    group = SlashCommandGroup("group")

    @group.command()
    async def subcommand1(self, ctx):
        await ctx.respond("This is a normal subcommand.")


# cog number 2, has a command used with add_to_group
from pycord.multicog import add_to_group

class Cog2(Cog):
    @add_to_group("group")  # the decorator that does the magic
    @slash_command()
    async def subcommand2(self, ctx):
        await ctx.respond("This subcommand is inside a different cog.")
```

### Applying multicog using apply_multicog
```py
from pycord.multicog import apply_multicog

my_bot.add_cog(Cog1())
my_bot.add_cog(Cog2())
...
apply_multicog(my_bot)  # manually apply multicog after cogs are loaded
```

### Applying multicog using Bot subclass
```py
from pycord.multicog import Bot

my_bot = Bot()  # will automatically apply multicog when commands are being synchronised
```
