Multi-purpose Discord Bot
Project description
PiBot
A discord bot providing administration and utility features!
Features
- Easy to run (uses Python)
- Modular cog-based architecture
- MongoDB integration for guild settings
- DeepL translation support
- Development tools for testing
Installation
You can run PiBot in two ways:
- From PyPI (after publishing):
pip install pibotoruv add pibot, then runpibot. - From Docker: use the image
tobiasgoetz/pibotfrom Docker Hub (see Docker below).
Local Development
Prerequisites
- Python 3.13 or higher
- uv package manager
- MongoDB instance (local or remote)
- Discord bot token from Discord Developer Portal
Setup
-
Clone the repository
git clone https://github.com/TobiasGoetz/pibot.git cd pibot
-
Install dependencies
uv sync -
Set up environment variables
Copy the example environment file and create your
.envfile with your values:cp .env.example .env
Edit
.envwith your actual values. The.env.examplefile contains all required and optional environment variables with descriptions. -
Run the bot
uv run pibot
Development Workflow
Running the Bot
The recommended way to run the bot during development is using uv directly:
uv run pibot
This provides:
- Fast iteration (no Docker rebuilds needed)
- Easy debugging with IDE integration
- Direct access to logs and file system
Development Features
When ENVIRONMENT is not set to production or testing:
- DevTools cog is automatically loaded with development commands
- Commands sync locally (not globally) for faster testing
- Additional debugging features are available
Code Quality
The project uses ruff for linting and formatting. Run it with:
uv run ruff check .
uv run ruff format .
Documentation
Update docs using:
uv run sphinx-apidoc -f -o docs/source src/pibot
Docker
Testing Docker Build Locally
To test the Docker build locally without publishing:
docker build -t pibot:local .
docker run --env-file .env pibot:local
Building and Publishing Multi-Architecture Images
⚠️ This will publish to Docker Hub. Make sure you're logged in with docker login before running.
To build and publish multi-architecture images from your local machine:
-
Create buildx builder (one-time setup):
docker buildx create --use --name pibot
-
Build and push multi-arch image to Docker Hub:
docker buildx build --platform linux/amd64,linux/arm64 --push -t tobiasgoetz/pibot .
This command will build the image for both AMD64 and ARM64 architectures and push it to Docker Hub.
Note: For active development, using uv directly is recommended over Docker for faster iteration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pibot_discord-3.2.3.tar.gz.
File metadata
- Download URL: pibot_discord-3.2.3.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea3e1627fe3c4bba95ea262950097a0ca12c27c95aeab27576a7f65204026d5
|
|
| MD5 |
9e80c7c9ce1128abc4ae0547476674f0
|
|
| BLAKE2b-256 |
904351c65977b0574330b543f6c5a0eff31e664735c402cc54d3ea219dd984e0
|
File details
Details for the file pibot_discord-3.2.3-py3-none-any.whl.
File metadata
- Download URL: pibot_discord-3.2.3-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc877aac9e4e5c77e85bb853e5778f3bcfa96601af127fbd8b65deb610e0104e
|
|
| MD5 |
9bad25dd95cc094b22f421915c947dbb
|
|
| BLAKE2b-256 |
0812103341e5794a2193ed2af53515ae8c58fcaba81ed46df2bf6fcc2c2a5c5a
|