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.14+
  • 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.14+ 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.1

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.1
File Size Uploaded
commanderbot-0.23.1.tar.gz 185.6 kB Details

Built distribution (wheel)

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

Total release size: 526.7 kB

Release files / commanderbot-0.23.1.tar.gz

Download URL commanderbot-0.23.1.tar.gz
Size 185.6 kB
Tags Source
SHA-256 checksum
How to use checksums
02645f6621ad6011f0c62246a5111ebe22cee99b7c3473918ee0c2b0a9034fa0
BLAKE2b-256 checksum
How to use checksums
47b7732ada1b97e0c405ae89ac76bf66aff003f819190cff1050d21ebb6ddec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","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.1-py3-none-any.whl

Download URL commanderbot-0.23.1-py3-none-any.whl
Size 341.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
204ab9baee3ba491948286f3a7d8fe2153f031c79799d206c6a8a4a85dab7208
BLAKE2b-256 checksum
How to use checksums
a23278abb73eedbc3fb93453f251b7491a243148bd1e50974eeaf1d55139b63d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","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 history Release notifications | RSS feed

This release

0.23.1 This release

2 release files

0.23.0

2 release files

0.21.1

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.19.0

2 release files

0.16.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

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