Skip to main content
Pre-release

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 clear configure 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 STAFF and OWNER; the owner is only mentioned in critical alerts and does not bypass staff authorization.
  • /server status and /server players report server state.
  • /server admin run, /server admin power, and /server admin statistics require the configured staff role.
  • /github link, /github unlink, /github list, and /github route manage repository destinations. These require Manage Server permission.
  • /post <name> publishes a configured .md or .yaml file to the channel where it is invoked. This requires Manage Server permission.
  • /ping and /help provide 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.dev6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hungernetbot 1.0.dev6
File Size Uploaded Provenance Actions
hungernetbot-1.0.dev6.tar.gz 41.5 kB With provenance Details for hungernetbot-1.0.dev6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hungernetbot 1.0.dev6
File Interpreter ABI Platform Actions
hungernetbot-1.0.dev6-py3-none-any.whl Python 3 none any Details for hungernetbot-1.0.dev6-py3-none-any.whl

Total release size: 83.6 kB

Release files / hungernetbot-1.0.dev6.tar.gz

Download URL hungernetbot-1.0.dev6.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8b737e9d4b88a1d38c23b01fbe16c19898e153bfac462b79c53c024d892cd654
BLAKE2b-256 checksum
How to use checksums
147938d2e1f837b2ec244768716719a6f841b857522642b9967e70e662ccf5e3
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 log

Release files / hungernetbot-1.0.dev6-py3-none-any.whl

Download URL hungernetbot-1.0.dev6-py3-none-any.whl
Size 42.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0a5dcd0ec81df4be2c48bc49c426dca7f0f9c08edf0930f87868852ac0bc7f4
BLAKE2b-256 checksum
How to use checksums
32d9cbe4e4f3036d252b626ea836fe687168b4c167a3ce76a4e03403a9774722
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 log

Security for hungernetbot 1.0.dev6

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.

Select from 2 files

Attestation for hungernetbot-1.0.dev6.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 log

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.

Release history Release notifications | RSS feed

This release
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