Stockpiles & Logistics

TM 26-06 Clusterfox (Discord Bot)

Stockpiles & Logistics

The bot provides Discord-native commands for managing depot stockpiles and logistics requests. Stockpile and logi data is shared with the web dashboard in real time.


Stockpiles

Stockpiles represent in-game depots. Each stockpile gets a dedicated Discord thread for inventory discussion and CSV updates.

Commands

/stockpile create

Requires S8 S8 - Depots or S4 S4 - Logistics

Opens a modal with the following fields:

  • Name — Stockpile display name
  • Code (optional) — In-game stockpile access code, shown on demand in the thread
  • Refresh hours — How many hours before the stockpile is considered expired (default: 40)

Creates a Discord thread in the stockpileUpdates channel for inventory discussion. The stockpile is immediately visible in /stockpile list and the web dashboard.

/stockpile list

Lists all active stockpiles with a freshness indicator:

Icon Status
🟢 Fresh
🟡 Expiring within 8 hours
🔴 Expired
Never refreshed

/stockpile view [name]

Displays all tracked items and their current quantities for the selected stockpile. The name field uses autocomplete.

/stockpile refresh [name]

Resets the expiry timer for a stockpile, marking it as freshly restocked. The name field uses autocomplete.

/stockpile archive [name]

Requires S8 S8 - Depots or S4 S4 - Logistics

Locks and closes the stockpile's Discord thread. The stockpile is marked as archived in the database and removed from /stockpile list.


CSV Inventory Updates

The bot parses Foxhole CSV inventory exports posted in stockpile threads. This is the primary way inventory is tracked.

How to update:

  1. Open the Stockpile Manager in-game and export the inventory (produces a .csv or .txt file).
  2. Paste or upload the file into the stockpile's Discord thread.

What the bot does:

  1. Detects the CSV or TXT attachment in the thread.
  2. Parses the Foxhole format (ItemName,Quantity).
  3. Computes a diff against the last recorded inventory: items added, removed, and quantity changes.
  4. Posts a summary embed showing the changes.
  5. Updates the stockpile record with the new inventory state.
  6. Checks all open logistics requests against the new inventory — if a request's items are now covered, it flags it.
  7. Auto-deletes the original CSV message to keep the thread clean.

Expiry Alerts

Eight hours before a stockpile expires, the bot sends a warning message to the stockpile's Discord thread and pings the configured depot or logistics role. Only one alert is sent per expiry window.


Logistics Requests

Logistics requests track supply needs across the regiment. Each request posts to the logiRequests channel and opens a discussion thread.

Commands

/logirequest create

Requires S4 S4 - Logistics

Options:

Option Required Notes
title Yes Max 120 characters
type Yes acquisition, move, or combined
priority Yes high, medium, or low
target Yes Target stockpile (autocomplete)
staging No Transit/staging stockpile (autocomplete)
description No Max 500 characters
expires No Expiry date in YYYY-MM-DD format

The bot posts a request embed to the logiRequests channel with a map visualization showing the target stockpile location, then opens a discussion thread. Items are added to the request from the web dashboard (Logistics section).

/logirequest list

Lists all open and in-progress requests, colour-coded by priority (red/yellow/grey).

/logirequest cancel [id]

Requires S4 S4 - Logistics

Cancels the request and updates the Discord embed to reflect the cancelled status.


Item Workflow

Once items have been added to a request in the web dashboard, each item appears on the request embed with interactive buttons:

  • Claim — Opens a notes modal; logi staff enter what they plan to provide and how
  • In Progress — Marks the item as actively being fulfilled
  • Unclaim — Returns the item to available status

When a stockpile CSV update shows that a request's items are now present at the target stockpile, the bot flags the request as potentially fulfilled for staff to verify and close.