proxmox-discord-connector
Python Discord bot template that queries Proxmox via slash commands.
The codebase now follows an object-oriented structure:
ProxmoxDiscordApplicationhandles app startup.ProxmoxDiscordBotsubclassescommands.Botand registers cogs insetup_hook.NodesCogandRandomMessageCogencapsulate slash command behavior.ProxmoxServiceencapsulates Proxmox API client access.
Requirements
- Python 3.11+
Setup
python -m venv .venv
cp .env.example .env
Activate the virtual environment:
# bash/zsh
source .venv/bin/activate
# fish
source .venv/bin/activate.fish
Install the project from the repository root (not src/):
python -m pip install -e .
Edit .env with your values.
DISCORD_BOT_TOKEN, PROXMOX_HOST, PROXMOX_USER, and PROXMOX_PASSWORD are required.
DISCORD_ALLOWED_USER_IDS is optional (comma-separated Discord user IDs).
DISCORD_SYNC_GUILD_ID is optional and recommended for development to get near-instant slash command updates.
PROXMOX_VERIFY_SSL defaults to true.
Environment variables
DISCORD_BOT_TOKEN: Discord bot token.DISCORD_ALLOWED_USER_IDS: Optional comma-separated allowlist for restricted commands (e.g.123,456).DISCORD_SYNC_GUILD_ID: Optional Discord server ID for development command sync (fast propagation).PROXMOX_HOST: Proxmox host or IP.PROXMOX_USER: Proxmox user (for exampleroot@pam).PROXMOX_PASSWORD: Proxmox password.PROXMOX_VERIFY_SSL:trueorfalse(defaults totrue).
Slash Command Sync Speed
Discord global slash command propagation can take a while.
For fast development updates, set DISCORD_SYNC_GUILD_ID to your server ID in .env.
Example:
DISCORD_SYNC_GUILD_ID=123456789012345678
When this is set, the bot copies global commands to that guild and syncs there on startup, so new commands usually appear quickly after restart.
Run
python -m proxmox_discord_connector.main
If activation is not working in your shell, run directly with the venv Python:
.venv/bin/python -m pip install -e .
.venv/bin/python -m proxmox_discord_connector.main
Slash commands
/nodes- List Proxmox nodes. HonorsDISCORD_ALLOWED_USER_IDSwhen provided./lxcs- List Proxmox LXC containers. HonorsDISCORD_ALLOWED_USER_IDSwhen provided./randommsg- Return a random greeting.
Project structure
src/proxmox_discord_connector/
app.py # Application entry object
bot.py # Bot subclass and setup_hook
config.py # Environment-backed settings
main.py # Executable module entrypoint
services/
proxmox_service.py # Proxmox API service layer
slash_commands/
nodes.py # NodesCog
randommsg.py # RandomMessageCog
Metadata
Release files for proxmox-discord-connector 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| proxmox_discord_connector-0.1.0.tar.gz | 9.1 kB | Without provenance | Details for proxmox_discord_connector-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proxmox_discord_connector-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for proxmox_discord_connector-0.1.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / proxmox_discord_connector-0.1.0.tar.gz
| Download URL | proxmox_discord_connector-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f80926af30834b4d6d1c27718009f05778ae8dea11529923bd9553a345fb41d6
|
|
BLAKE2b-256 checksum How to use checksums |
9943f6fac4c62ffb8a0471a464241c9001c4ed977eeb7bae7d88e2b091d88703
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / proxmox_discord_connector-0.1.0-py3-none-any.whl
| Download URL | proxmox_discord_connector-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e59666208e1facd4efb129a810e8a36b96519e5a86e0a57f2bb270db4902e41
|
|
BLAKE2b-256 checksum How to use checksums |
50c17a397179aa1e06409f810d8dc9e6dea32333a2a375765cc58a47765af29c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for proxmox-discord-connector 0.1.0
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.