pycord-multicog


Namepycord-multicog JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/Dorukyum/pycord-multicog
SummaryA pycord extension that allows splitting command groups into multiple cogs
upload_time2024-05-18 04:35:15
maintainerNone
docs_urlNone
authorDorukyum
requires_pythonNone
licenseMIT
keywords pycord
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pycord-multicog
[![Downloads](https://img.shields.io/pypi/dm/pycord-multicog?logo=pypi&logoColor=white)](https://pypi.org/project/pycord-multicog/)
[![Discord](https://img.shields.io/discord/789829818547175446?label=discord&logo=discord&color=5865F2&logoColor=white)](https://discord.com/invite/8JsMVhBP4W)

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

## Installation
Requires pycord v2.5 or higher.

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

## Usage
### Initialising bot
```py
from pycord.multicog import Bot

bot = Bot(...)
```

### Creating commands
```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 commands decorated with @subcommand
from pycord.multicog import subcommand

class Cog2(Cog):
    @subcommand("group")  # this subcommand depends on the group defined in Cog1
    @slash_command()
    async def subcommand2(self, ctx):
        await ctx.respond("This subcommand is inside a different cog.")

    @subcommand("group", independent=True)  # this subcommand is independent
    @slash_command()
    async def subcommand2(self, ctx):
        await ctx.respond("This subcommand is also inside a different cog.")
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Dorukyum/pycord-multicog",
    "name": "pycord-multicog",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Pycord",
    "author": "Dorukyum",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c1/7e/baa13ef1a35314f6732b77b2aee4f4e902cae22ea4dd99d95ec671ef4821/pycord-multicog-2.1.1.tar.gz",
    "platform": null,
    "description": "# pycord-multicog\n[![Downloads](https://img.shields.io/pypi/dm/pycord-multicog?logo=pypi&logoColor=white)](https://pypi.org/project/pycord-multicog/)\n[![Discord](https://img.shields.io/discord/789829818547175446?label=discord&logo=discord&color=5865F2&logoColor=white)](https://discord.com/invite/8JsMVhBP4W)\n\nA pycord extension that allows splitting command groups into multiple cogs.\n\n## Installation\nRequires pycord v2.5 or higher.\n\n```sh\n$ pip install pycord-multicog\n```\n\n## Usage\n### Initialising bot\n```py\nfrom pycord.multicog import Bot\n\nbot = Bot(...)\n```\n\n### Creating commands\n```py\n# cog number 1, a normal cog with a slash command group\nclass Cog1(Cog):\n    group = SlashCommandGroup(\"group\")\n\n    @group.command()\n    async def subcommand1(self, ctx):\n        await ctx.respond(\"This is a normal subcommand.\")\n\n\n# cog number 2, has commands decorated with @subcommand\nfrom pycord.multicog import subcommand\n\nclass Cog2(Cog):\n    @subcommand(\"group\")  # this subcommand depends on the group defined in Cog1\n    @slash_command()\n    async def subcommand2(self, ctx):\n        await ctx.respond(\"This subcommand is inside a different cog.\")\n\n    @subcommand(\"group\", independent=True)  # this subcommand is independent\n    @slash_command()\n    async def subcommand2(self, ctx):\n        await ctx.respond(\"This subcommand is also inside a different cog.\")\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A pycord extension that allows splitting command groups into multiple cogs",
    "version": "2.1.1",
    "project_urls": {
        "Homepage": "https://github.com/Dorukyum/pycord-multicog",
        "Source": "https://github.com/Dorukyum/pycord-multicog"
    },
    "split_keywords": [
        "pycord"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b4ae5be5c68bf9a071b056df70960924185f25266d3b2cca3c74ce35a057769",
                "md5": "12ef320ab6bfda6302c3e76816fef7e3",
                "sha256": "847328f9c49970e58c53d5eb19b945aad64ae95ba8b6dd40fa6b8b8ca3100c0f"
            },
            "downloads": -1,
            "filename": "pycord_multicog-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12ef320ab6bfda6302c3e76816fef7e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4276,
            "upload_time": "2024-05-18T04:35:14",
            "upload_time_iso_8601": "2024-05-18T04:35:14.489690Z",
            "url": "https://files.pythonhosted.org/packages/4b/4a/e5be5c68bf9a071b056df70960924185f25266d3b2cca3c74ce35a057769/pycord_multicog-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c17ebaa13ef1a35314f6732b77b2aee4f4e902cae22ea4dd99d95ec671ef4821",
                "md5": "4845aaef14e671589a67b659ee2cf0e7",
                "sha256": "2c56b916d14c06bc3695fdd591cd902a1394d13eaad8b1cadc3ea3e70696e71f"
            },
            "downloads": -1,
            "filename": "pycord-multicog-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4845aaef14e671589a67b659ee2cf0e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3976,
            "upload_time": "2024-05-18T04:35:15",
            "upload_time_iso_8601": "2024-05-18T04:35:15.967001Z",
            "url": "https://files.pythonhosted.org/packages/c1/7e/baa13ef1a35314f6732b77b2aee4f4e902cae22ea4dd99d95ec671ef4821/pycord-multicog-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-18 04:35:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Dorukyum",
    "github_project": "pycord-multicog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pycord-multicog"
}
        
Elapsed time: 0.40731s