Skip to main content

BetterDisco

BetterDisco is an up-to-date modernized fork of Disco, a library witten by b1nzy, the creator of Discord's API, iirc. Disco is a library, written in Python 3 to interface with Discord's API as efficiently and effectively as possible. Disco is expressive, and contains a functional interface. Disco is built for performance and efficiency. Disco is scalable and works well in large and small deployments. Disco is configurable and modular. Disco contains evented network and IO pipes, courtesy of gevent. Buzzwords 100. WYSIWYG.

Installation

Disco is designed to run both as a generic-use library, and as a standalone bot toolkit. Installing disco is as easy as running pip install betterdisco-py --upgrade --no-cache-dir, however, additional options are available for extended features, performance, and support:

This Installs these Why?
betterdisco-py gevent, requests, websocket-client Required for base Disco functionality.
betterdisco-py[http] flask Useful for hosting an API to interface with your bot.
betterdisco-py[performance] erlpack, isal, regex, pylibyaml, ujson, wsaccel Useful for performance improvement in several areas. I am speed.
betterdisco-py[sharding] gipc, dill Required for auto-sharding and inter-process communication.
betterdisco-py[voice] libnacl Required for VC connectivity and features.
betterdisco-py[yaml] pyyaml Required for YAML support, particularly if using config.yaml.
betterdisco-py[all] All of the above, unless otherwise noted. All additional packages, for the poweruser that absolutely needs it all.

Examples

Simple bot using the built-in bot authoring tools:

from disco.bot import Plugin


class SimplePlugin(Plugin):
    # Plugins provide an easy interface for listening to Discord events
    @Plugin.listen('ChannelCreate')
    def on_channel_create(self, event):
        event.channel.send_message('Woah, a new channel huh!')

    # They also provide an easy-to-use command component
    @Plugin.command('ping')
    def on_ping_command(self, event):
        event.reply('Pong!')

    # Which includes command argument parsing
    @Plugin.command('echo', '<content:str...>')
    def on_echo_command(self, event, content):
        event.reply(content)

Using the default bot configuration, we can now run this script like so:

python -m disco.cli --token="MY_DISCORD_TOKEN" --run-bot --plugin simpleplugin

And commands can be triggered by mentioning the bot (configured by the BotConfig.command_require_mention flag):

For further information and configuration options, please refer to our documentation first and foremost.

Metadata

Release files for betterdisco-py 2025.6.11

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

Source distribution (sdist)

Source distribution for betterdisco-py 2025.6.11
File Size Uploaded Provenance Actions
betterdisco_py-2025.6.11.tar.gz 102.5 kB With provenance Details for betterdisco_py-2025.6.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for betterdisco-py 2025.6.11
File Interpreter ABI Platform Actions
betterdisco_py-2025.6.11-py3-none-any.whl Python 3 none any Details for betterdisco_py-2025.6.11-py3-none-any.whl

Total release size: 223.6 kB

Release files / betterdisco_py-2025.6.11.tar.gz

Download URL betterdisco_py-2025.6.11.tar.gz
Size 102.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e005959f3f8a1c0776abb7440c1751ba1139e9c517988308301bb4ff8c556b7d
BLAKE2b-256 checksum
How to use checksums
21d599dd3a3425c84dec818c22887fdf22f95449376f53a0a7d7ba774c28befb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

Release files / betterdisco_py-2025.6.11-py3-none-any.whl

Download URL betterdisco_py-2025.6.11-py3-none-any.whl
Size 121.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10c180792081cef0723ede6dcf4c3959f08a85b1be4c1ca8574328ee109b86e1
BLAKE2b-256 checksum
How to use checksums
265c4beefd6589b4e806593c16e35c52d05bdc1c7a5882230d6f01c4eaa59e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

Security for betterdisco-py 2025.6.11

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for betterdisco_py-2025.6.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

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.

Release history Release notifications | RSS feed

This release

2025.6.11 This release

2 release files Full provenance

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