Skip to content

feat: add Discord server status module - #55

Open
koji-assistant[bot] wants to merge 2 commits into
mainfrom
feat/discord-server-status
Open

koji-assistant[bot] wants to merge 2 commits into
mainfrom
feat/discord-server-status

Conversation

@koji-assistant

@koji-assistant koji-assistant Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add discord-server-status, a lightweight module for Discord-visible server/player status.
  • Adds Discord !status / !serverstatus / !players trigger replies, optional scheduled Discord status posts, and an in-game /serverstatus command.
  • Reports Takaro-visible server name + online player count/list; intentionally does not promise host CPU/RAM/process stats because those require panel/core support.

Source

  • Discord archive message 6c2749ee-c7b4-4649-b508-01bb1456ccb1 from svmotnik in #discussion at 2026-07-17T16:35:04.596Z:

    Hello! Can Takaro show server stats on Discord? Cause I can't find any info.

Test plan

  • npm run build
  • node --test-concurrency 1 --import=ts-node-maintained/register/esm --test 'modules/discord-server-status/test/*.test.ts'
  • node --check on all module component/helper JS files
  • node dist/scripts/module-to-json.js modules/discord-server-status /tmp/discord-server-status-export.json
  • Verified export contains command serverstatus, hook discordStatus, cron postDiscordStatus, and helper functions.
  • Sandbox push/runtime QA blocked during this cron by sandbox login returning HTTP 503: no available server; needs retry when sandbox is healthy.
  • Real Discord hook/cron QA still needed after sandbox import/install with a configured Discord channel.

Review notes

  • Local review checked for common module pitfalls: no external HTTP calls, no secrets logged, no required Discord channel for install, Discord bot messages ignored, player-list length configurable, and CPU/RAM/process stats explicitly scoped out.

Follow-up update

  • Discord archive messages 6c9afe15-e96d-41d5-9dcd-d4135acc69b6 / 50d85d3d-9491-4a9a-90f3-e780d95888e1 / e93c0c4c-7b1b-4272-b5be-887e32e380ef asked for player-count/status updates on the same Discord message.
  • Added updateStatusMessage config: scheduled status can now edit one persistent bot-authored Discord message via discordControllerUpdateMessage, falling back to posting/storing a replacement if the saved message was deleted or cannot be edited.
  • Additional local verification: npm run build; focused discord-server-status test; node --check on updated component/helper files; module export conversion.

@koji-assistant

Copy link
Copy Markdown
Contributor Author

CI update: Build and typecheck passed on head 1e65a6d, but Integration tests failed before module tests ran during Bootstrap Takaro stack because the shared image 967985385710.dkr.ecr.eu-west-3.amazonaws.com/takaro-app-api:latest is missing (manifest unknown: Requested image not found).

This matches the known shared CI bootstrap/ECR image blocker, not a module-code failure. Local checks still passed:

  • npm run build
  • focused pure helper tests for discord-server-status
  • node --check on all module JS files
  • module-to-json export shape check

Runtime/sandbox QA is still pending once the sandbox/CI image path is healthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants