Skip to content
NapoSkyPublic

About

Foxhole discord bot - Operational awareness for foxhole regiments

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

112 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PICKET

PICKET

The operational watchpost of a regiment. A Discord bot for Foxhole regiments: know what must be done, what must be monitored, and what happened while you were away.

CI License: PolyForm Noncommercial Docs

PICKET 1.1.0 — temporary voice channels. The source includes the foundation, todo lists, timers, war log, opt-in voice statistics and temporary voice channels. See what is built.

PICKET is faction-neutral (Wardens and Colonials alike), lightweight, and built for regiment-scale collaboration. It is a community project: it is not affiliated with, endorsed by or sponsored by Siege Camp.

What is built

Area State
Todo lists /todolist create posts an interactive list; one button per item; quantities (x3), categories, pagination beyond 25 items; list content and progress stay in Discord, with creation metadata in the audit log
Timers A countdown board per channel for stockpiles, facilities, fields, ships, tanks and trains; place suggestions as you type; one button per timer to refresh it, however many people click at once; silent expiry alerts with configurable thresholds and roles; strike, clean up, repair; the state lives in the database, so a deleted message is simply reposted
Permissions Three levels (member, officer, admin), roles configurable per server, audit log of every change
Server settings Language, time zone, audit channel, per-feature switches
Multi-server Every server is isolated at the database level (row-level security)
Data management Administrator removal makes the bot leave and schedules data erasure; retention also applies after an external removal
Languages English, French, German, Spanish, Brazilian Portuguese, Polish and Simplified Chinese; add one by dropping a JSON file in packages/i18n/locales
Operations Zero-downtime rolling updates, several identical replicas, signed requests only, secrets kept out of the repository and the logs; private owner-only server departures from the support server
Temporary voice channels Private deployment queue, up to 10 officer-defined templates, automatic empty-channel cleanup and restart recovery
Voice statistics Opt-in role-filtered presence, 60-day history, own-data erasure and custom EN/FR dashboards with Discord OAuth and Team administration
War log One shared collector; one-line events in a regular text channel; up to three of five zones per server; subscription renewal for each war; recovery without replay

Commands

Access roles are configured per server. Officers can also use member commands; server administrators have full access.

Officers and administrators

Command What it does
/picket settings Opens the private server configuration panel; permission changes and data management are reserved for administrators
/stats export Export statistics exclusively for this server (CSV/JSON, 1–60 days)
/stats settings Configure explicit activation and excluded voice channels; member role changes require an administrator
/stats status Show collection settings and retention
/timers cleanup Removes struck timers
/timers create Creates the channel's timer board
/timers repair Reposts the timer board
/timers settings Opens the private timer configuration panel
/voice settings Configure voice templates and deployment limits, and inspect open channels
/warlog settings Chooses a text channel, up to three zones and activation for the current war

Members

Command What it does
/picket status Shows server settings, configured access roles and your access level
/stats link Open the voice statistics dashboard
/stats privacy Opt out or erase your voice statistics
/timers add Adds a timer: choose its type and place, then fill in a form
/timers strike Strikes a timer
/todolist create Opens a form and posts a todo list in the channel
/voice create Build a private queue of voice templates and deploy one or several channels

The official voice statistics dashboard is stats.picket-foxhole.com. Sign in with Discord; see the voice statistics guide for setup and privacy.

The full guide is in the documentation. By using the official instance you accept its Terms of Service and Privacy Policy.

Service operators can use /picket-ops servers in any channel of their support server to search servers, review their configuration, and confirm an individual bot departure with a reason. This command is separate from tenant administrator permissions and Stats; see operator setup.

Use it

Add PICKET to Discord — keep your regiment in sync with todo lists and timers

Add PICKET to your server, then run /picket settings to choose your language and access roles. Create your first list with /todolist create or a timer board with /timers create.

Discord's installation link requests the configured scopes and permissions automatically. PICKET needs View Channel, Send Messages, Embed Links and Read Message History where you use it, plus Send Messages in Threads for threads. Temporary voice channels additionally require Manage Channels and visibility of their destination categories. No Audit Log, Connect or extra intent is requested. It requests Server Members Intent to track role eligibility during voice presence; Presence and Message Content intents remain disabled. It reads its own messages to update your lists and boards.

Need help or want to share feedback? Join the PICKET support Discord.

Self-hosting and development

To run your own instance, understand the architecture or work on the code, see the self-hosting and development guide.

Contribute

Bug reports, code, documentation and translations are welcome. Browse the open issues to find planned work and problems to help solve.

  • Report a bug: open an issue with the steps to reproduce, expected behavior and what happened. Include the deployed version and relevant logs, with secrets and personal data removed.
  • Suggest an improvement: explain the user problem and the expected benefit in an issue. Discuss larger changes before implementing them so their scope and architecture can be agreed.
  • Contribute code: fork the repository, create a branch and submit a focused pull request. Describe the change and how you verified it. Use the development guide to set up and run the relevant checks, and follow the architecture guide.
  • Improve the documentation: edit the Markdown files in docs/, keep English and French pages aligned and check the result with pnpm docs:build.
  • Translate the bot: edit an existing catalog or submit a UTF-8 i18next JSON file in packages/i18n/locales/<discord-locale>.json, using English as the source. Preserve keys, placeholders and Discord's length limits. See the translation guide.

Keep credentials, .env files, database dumps and generated build files out of pull requests.

Dependency maintenance and security policy

Dependabot keeps its weekly updates and separate npm, GitHub Actions, Docker and Docker Compose PRs. Only npm Dependabot PRs and the dedicated maintenance/npm-lockfile PR participate in the retry controller. After a failed CI/Docs run, or during its daily catch-up, it may retry failed jobs once per workflow and commit when every failure is a recognized network/service error or a timeout. Audit failures, secret findings and unclassified test/build failures remain for review. The controller only reads GitHub metadata and logs; it never executes PR code. Its job summary records the decisions without posting repeated PR comments.

The dependency audit covers every workspace, including development tools. High/critical findings block CI, including findings without a published fix, except for the reviewed temporary risk below. Low/moderate findings remain visible in the job summary and the dependency-audit JSON artifact (30-day retention), and do not block unrelated updates by default. An unavailable registry or invalid report still fails CI. Run node scripts/dependency-audit.cjs for the CI policy and full report. Plain pnpm audit still reports the temporarily accepted High finding and can exit with a failure.

Until 2026-12-01 00:00 UTC, only GHSA-fc5q-39xc-vjpf / CVE-2026-112366 in picomatch is accepted at High severity. It is used by Jest, Vite and VitePress; production dependencies do not include it. The audit checks this on every affected run using pnpm why --recursive --prod picomatch --json; any match, failed command or invalid report fails CI. The original finding remains in the summary and JSON artifact alongside the production graph check. Other High/Critical findings still block, and this exception stops applying at its expiry, including if the same advisory becomes Critical.

This ReDoS concerns crafted repeated extglob patterns. Our current use is developer-controlled file matching; there is still exposure in development/CI tools, so this is temporary risk acceptance, not a local fix. Snyk withdrew its advisory, while GitHub still lists it without a patched version as reviewed on 2026-11-17. Recheck upstream releases and both advisories before expiry, and remove or explicitly reassess the exception when a fix or our exposure changes. It is deliberately kept out of audit.ignore so the finding and complete High/Critical counts remain visible.

Triage considers reachable code, untrusted input, runtime/CI exposure and impact, rather than severity alone. Stats' web/API surface and the bot's signed interactions both process external input. A lower-severity issue can still require urgent action when exploitable in our use. Reviewed risks may remain accepted while the exposure is unchanged; no automatic override, custom patch or major upgrade is required merely to reach zero findings. Revisit accepted risks during dependency reviews and when exposure or advisory information changes. The existing verified deepmerge backport and its specific exception remain enforced; see its rationale.

The Dependabot automatic merge controller merges same-repository Dependabot npm, GitHub Actions and root Docker PRs into the default branch, including major updates, after all workflows on their current commit succeed. CI is mandatory; Docs is also mandatory when its path filters apply. A newer pending, failed, cancelled or skipped run prevents merging. Drafts, conflicts, requested changes and incomplete file lists remain for review. Docker Compose PRs, anything under deploy/, and Compose files anywhere in the tree always remain manual, including mixed changes and renames. The controller reads GitHub metadata from trusted default-branch code; it never executes PR code or downloads PR artifacts with its write token.

After checking the files, workflows and latest PR state, it supplies the required approval if needed and squash merges with the exact tested head SHA. GitHub branch protections still apply. Completion events from CI/Docs and a six-hour catch-up drive the controller, with one merge per invocation and serialized executions. It waits for every triggered default-branch workflow before merging another PR, including Docs-only pushes; default-branch workflow completions wake the controller again as soon as this gate clears. Merges made with GITHUB_TOKEN do not start push workflows, so it explicitly dispatches CI and Docs on main. Successful main CI dispatched by github-actions[bot] can deploy through the existing protected production environment; manual dispatches and maintenance-branch CI do not deploy the application. A later controller run recovers missing post-merge dispatches. No personal access token is stored in the repository.

The npm lockfile maintenance workflow refreshes direct/transitive resolutions weekly within the existing manifest constraints, preserving overrides and patches and requiring releases to be at least three days old. It also audits the current default branch every week, even when no update or maintenance PR is available. It manages one lockfile-only PR, launches CI explicitly (including the documentation build), and leaves review and merge manual. Docker Compose keeps its independent Dependabot cycle and is not changed by this workflow.

Enable Settings → Actions → General → Workflow permissions → Allow GitHub Actions to create and approve pull requests for the required Dependabot approval and automatic maintenance PR creation. Keep the default workflow permission read-only; the privileged controllers request their own limited write permissions. The lockfile maintenance workflow uses only GITHUB_TOKEN and leaves its own PRs for manual review and merge. The workflows and controller must first be published on the default branch. Test the controller/policy with node --test tests/security/dependency-automation.test.cjs tests/security/dependabot-merge.test.cjs; run the maintenance workflow manually from main to validate its first PR. Existing PR runs retain their old workflow until their branch/merge ref is refreshed.

License

PICKET is licensed under the PolyForm Noncommercial License 1.0.0: you may use, change and share it for any noncommercial purpose, including running it for your own community, regiment or association. Selling it, or offering it as a paid service, is not permitted. This is a source-available license, not an OSI-approved open source license.

Foxhole is a game by Siege Camp. "Foxhole", its names, logos, artwork, maps, structure and item names and icons, and the data of the Foxhole War API belong to Siege Camp or its licensors and are not covered by this license. See NOTICE.

Required Notice: Copyright 2026 NapoSky (https://github.com/NapoSky/picket)

About

Foxhole discord bot - Operational awareness for foxhole regiments

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages