Skip to main content

commanderbot-py

A collection of utilities and extensions for discord.py bots.

uv-badge ruff-badge ty-badge package-badge version-badge

Requirements

  • Python 3.15+
  • discord.py 2.7+

Running your bot

You can run your own bot without writing any code.

You will need the following:

  1. Your own Discord Application with a bot token.
  2. A configuration file for the bot.
  3. A Python 3.15+ environment.
  4. Run pip install commanderbot to install the bot core package.

The first thing you should do is check the CLI help menu:

python -m commanderbot --help

There are several ways to provide a bot token:

  1. (Recommended) As the BOT_TOKEN environment variable: BOT_TOKEN=put_your_bot_token_here
    • Supports .env files: use .env in the working directory or provide the --envfile option
  2. As a CLI option: --token put_your_bot_token_here
  3. As a standalone file: --tokenfile path_to_file_with_bot_token
  4. Manually, when prompted during start-up

Here's an example that provides the bot token as an argument:

python -m commanderbot bot.json --token put_your_bot_token_here

Configuring your bot

The current set of configuration options is limited. The following is an example configuration that sets the command prefix, enabled privileged intents, and loads the sudo, status and faq extensions.

The sudo extension is essential to managing the bot. It can do things like syncing commands, setting the bot's profile picture, or even exporting the config.

An extension prefixed with $ means the extension is required and cannot be managed while the bot is running. If the extension's config uses the object syntax, you can make the extension required by adding "required": true.

Note that with this configuration, the faq extension will require read-write access to faq.json in the working directory.

{
  "command_prefix": ".",
  "privileged_intents": {
    "message_content": true,
    "members": true
  },
  "extensions": [
    "$commanderbot.ext.sudo",
    "commanderbot.ext.status",
    {
      "name": "commanderbot.ext.faq",
      "options": {
        "database": "faq.json"
      }
    }
  ]
}

Metadata

Release files for commanderbot 0.23.2

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

Source distribution (sdist)

Source distribution for commanderbot 0.23.2
File Size Uploaded Provenance
commanderbot-0.23.2.tar.gz 202.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for commanderbot 0.23.2
File Interpreter ABI Platform
commanderbot-0.23.2-py3-none-any.whl Python 3 none any Details

Total release size: 543.8 kB

Release files / commanderbot-0.23.2.tar.gz

Download URL commanderbot-0.23.2.tar.gz
Size 202.7 kB
Tags Source
SHA-256 checksum
How to use checksums
33fe419af7bad89e67a0f6dbe0c5f2b475d08614b1316d5b98d1156df3bced3d
BLAKE2b-256 checksum
How to use checksums
800a8824d0e422ba808630a8af46989c16c66b95aaeaadd0bc184042a058abcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / commanderbot-0.23.2-py3-none-any.whl

Download URL commanderbot-0.23.2-py3-none-any.whl
Size 341.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee878b41b3ab08447d50166df403856a8d98a00a1e5b91ff78ecdddd84f1e8a9
BLAKE2b-256 checksum
How to use checksums
67a6c1f9f5205cf26a36e358f2c0016f3a4cc9baab7824000654201467653f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for commanderbot 0.23.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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