Skip to main content

disnake-ext-plugins

An extension for disnake that serves as a robust replacement for cogs. No more pointless inheritance, no more singleton classes serving as little more than a namespace, and no more unexpected behaviour when you get anywhere near the inner workings of your extensions.

Key Features

  • Smoothly integrates with disnake,
  • Manage your extensions without inheritance,
  • Minimum boilerplate, maximum control.

Installing

Python 3.8 or higher is required

To install the extension, run the following command in your command prompt/shell:

# Linux/macOS
python3 -m pip install -U disnake-ext-plugins

# Windows
py -3 -m pip install -U disnake-ext-plugins

After installing, disnake-ext-plugins can be imported as

import disnake_plugins

Example

import disnake
import disnake_plugins


plugin = disnake_plugins.Plugin()


@plugin.slash_command()
async def my_command(inter: disnake.CommandInteraction):
    await inter.response.send_message("Woo!")


setup, teardown = plugin.create_extension_handlers()

Further examples can be found in the examples directory.

Why not disnake.ext.plugins?

Registering into the disnake.ext namespace brings with it a variety of issues, starting with being unable to properly make editable installs into .../site-packages/disnake/ext/. It also leads to inconsistencies with Sphinx autodoc & co., which are simply annoying to work around. This extension used to be part of the disnake.ext namespace, and there used to be a symlink script to get around the editable install limitation. However, we ultimately decided staying in the disnake.ext namespace for its "legacy" wasn't worth the headaches.

Contributing

Any contributions are welcome, feel free to open an issue or submit a pull request if you'd like to see something added. Contribution guidelines will come soon.

Metadata

Release files for disnake-ext-plugins 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for disnake-ext-plugins 0.3.0
File Size Uploaded
disnake_ext_plugins-0.3.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for disnake-ext-plugins 0.3.0
File Interpreter ABI Platform
disnake_ext_plugins-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / disnake_ext_plugins-0.3.0.tar.gz

Download URL disnake_ext_plugins-0.3.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ff55e50229ef7394f8a412395c4a6d0df652b01d9aba501c0a766ade75b074f
BLAKE2b-256 checksum
How to use checksums
91c4165db95505242c3d59aba16257f065a51a8a411f66fe175516e3db90e319
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.6 Linux/5.10.16.3-microsoft-standard-WSL2

Release files / disnake_ext_plugins-0.3.0-py3-none-any.whl

Download URL disnake_ext_plugins-0.3.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bc462c74d71e4390f795ff8ec7615b6930246a0a874d849f3bd87e465eef47e
BLAKE2b-256 checksum
How to use checksums
66c0b0d7a8e7816970f75da1399d733f312f1846f5ad58332642297b7fc16168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.6 Linux/5.10.16.3-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page