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"
      }
    }
  ]
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commanderbot-0.23.0.tar.gz (185.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commanderbot-0.23.0-py3-none-any.whl (340.4 kB view details)

Uploaded Python 3

File details

Details for the file commanderbot-0.23.0.tar.gz.

File metadata

  • Download URL: commanderbot-0.23.0.tar.gz
  • Upload date:
  • Size: 185.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for commanderbot-0.23.0.tar.gz
Algorithm Hash digest
SHA256 d596550871722236ee5990fe4f8574ca38a688a0b79891b9a27d667ebc236948
MD5 a4f92f68eccbeea577962ed7d689e059
BLAKE2b-256 86447161920b2049372227604e6c6bba01ceff49899cee32bd52402ff101ac8c

See more details on using hashes here.

File details

Details for the file commanderbot-0.23.0-py3-none-any.whl.

File metadata

  • Download URL: commanderbot-0.23.0-py3-none-any.whl
  • Upload date:
  • Size: 340.4 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for commanderbot-0.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8a6db4a8ad3ffae3a8b9a7a0c6817ebff753eced0a820efed3db2d266380224
MD5 bc9f4ebe73118f5345729ad94166c01c
BLAKE2b-256 2349c217f33094179e959b0867d50325abe99dd398c90725a7bbae2ff0d12b88

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.23.0 This release

2 files

0.22.0

2 files

0.21.1

2 files

0.21.0

2 files

0.20.2

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 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