This release is a pre-release and may not be stable for production use.
HungerNet Bot
HungerNet's official Discord bot.
Installation
python -m pip install hungernetbot
Run the bot with hungernetbot or python -m hungernetbot after configuring the environment.
For container deployment, see the Calagopus egg guide.
Configuration
The bot reads configuration from environment variables. Secrets are never stored in the package.
| Variable | Required | Purpose |
|---|---|---|
DISCORD_TOKEN |
Yes | Discord bot token. |
PANEL_URL |
Yes | Calagopus panel base URL. |
PANEL_API_KEY |
Yes | Calagopus API key. |
SERVER_ID |
Yes | Minecraft server UUID or short ID. |
BRIDGE_URL |
Yes | HungerBridge endpoint for the Minecraft server. |
BRIDGE_TOKEN_ID |
Yes | HungerBridge token ID. |
BRIDGE_TOKEN_SECRET |
Yes | HungerBridge token secret. |
BRIDGE_WEBHOOK_TOKEN |
Yes | Shared token for HungerCore's webhook receiver. |
GITHUB_WEBHOOK_SECRET |
Yes | GitHub webhook signing secret. |
SERVER_NAME |
No | Display name; defaults to Hunger SMP. |
SERVER_DOMAIN |
No | Public server address; defaults to localhost. |
MINECRAFT_SERVER_PORT |
No | Public Minecraft server port; defaults to 25565. |
WEBHOOK_HOST |
No | Bind address for the shared webhook listener; defaults to 0.0.0.0. |
WEBHOOK_PORT |
No | Shared GitHub/HungerBridge webhook port; defaults to Calagopus's SERVER_PORT, or 8000 outside Calagopus. |
DATABASE_PATH |
No | New SQLite database path; defaults to ./data/hungernetbot.sqlite3. |
POSTS_DIRECTORY |
No | Named post directory; defaults to ./posts. |
DEV_GUILD_IDS |
No | Comma-separated guild IDs for immediate slash command sync. |
Set these variables in the process environment or your deployment platform. Rotate credentials that were present in the legacy source before deploying; removing source files does not remove values from Git history.
For Calagopus, allocate one SERVER_PORT. Both webhook routes share it: /github/webhook for GitHub and /webhook for HungerBridge.
Commands
/settings show,/settings staff-role,/settings notification-channel,/settings owner, and/settings clearconfigure per-server values. They require Manage Server permission.- Settings are independent per Discord server. Without a notification channel, the bot skips channel notifications. Unset staff-role and alert-owner values display as
STAFFandOWNER; the owner is only mentioned in critical alerts and does not bypass staff authorization. /server statusand/server playersreport server state./server admin run,/server admin power, and/server admin statisticsrequire the configured staff role./github link,/github unlink,/github list, and/github routemanage repository destinations. These require Manage Server permission./post <name>publishes a configured.mdor.yamlfile to the channel where it is invoked. This requires Manage Server permission./pingand/helpprovide bot status and command guidance.
The shared webhook server handles GitHub at /github/webhook and HungerBridge at /webhook. Configure the GitHub URL and GITHUB_WEBHOOK_SECRET in each organization or repository webhook; HungerBridge requests use the X-Webhook-Token header.
Post Files
The configured posts directory is created on startup. /post update resolves update.md or update.yaml; specify an extension when both exist. Every invocation posts again. The bot does not keep a posting history or suppress duplicates.
Use .md for regular Discord Markdown message content. Use .yaml for structured messages with content, embeds, polls, attachments, mention rules, supported message flags, and URL buttons. YAML is declarative; it cannot run code or define custom button callbacks. User mentions must use Discord mention syntax or IDs, not bare usernames.
content: 'A new community update is available.'
embeds:
- title: 'What changed'
description: 'Read the [update notes](https://example.com/updates).'
color: '#C82828'
fields:
- name: 'Highlights'
value: 'New maps and server improvements'
inline: false
buttons:
- label: 'Read more'
url: 'https://example.com/updates'
allowed_mentions:
everyone: false
users: true
roles: true
Attachments are relative to the posts directory. Embed colors accept an integer or hex string. Polls accept a question, 2–10 answers, a duration from 1–32 hours, and an optional multiple boolean. tts, silent, and suppress_embeds control supported Discord message flags.
Development
python -m pip install -e '.[dev]'
pytest
The bot starts with a fresh SQLite database; it does not import data from previous versions.
Metadata
Release files for hungernetbot 1.0.dev4
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 |
|---|---|---|---|---|
| hungernetbot-1.0.dev4.tar.gz | 41.6 kB | With provenance | Details for hungernetbot-1.0.dev4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hungernetbot-1.0.dev4-py3-none-any.whl | Python 3 | none | any | Details for hungernetbot-1.0.dev4-py3-none-any.whl |
Total release size: 83.8 kB
Release files / hungernetbot-1.0.dev4.tar.gz
| Download URL | hungernetbot-1.0.dev4.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63afdce164bc8bc3a3ec70dc59f0a4ee759677321cf5ef60338ad58f56533dad
|
|
BLAKE2b-256 checksum How to use checksums |
5a48771b3495189fe035f3d01ccf101037f0d9b00688e72905297df753513133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logRelease files / hungernetbot-1.0.dev4-py3-none-any.whl
| Download URL | hungernetbot-1.0.dev4-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffbff21c54d842742ffe240f7aa599841920bb6dce629bff649b798cd47cc348
|
|
BLAKE2b-256 checksum How to use checksums |
bcc1c18f14201534ad230cc62d5ead9df63a9898aee7411b3bedbf65cba55995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for hungernetbot 1.0.dev4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hungernetbot-1.0.dev4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA 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.