Skip to content

EQNotify: Telegram delivery errors + Officer/Knight list-users command#265

Merged
ebm5025 merged 3 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s
Jul 24, 2026
Merged

EQNotify: Telegram delivery errors + Officer/Knight list-users command#265
ebm5025 merged 3 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s

Conversation

@ebm5025

@ebm5025 ebm5025 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two EQNotify follow-ups (bundled because #265 hadn't merged yet — both are small and touch the same feature).

1. Surface Telegram delivery errors and guide bot /start

Fixes the opaque /eqnotify AxiosError: Request failed with status code 400 on /eqnotify test after registering with Telegram.

Root cause is a Telegram constraint: a bot cannot initiate a conversation. If a user registers their chat ID but hasn't messaged the EQNotify bot, the API rejects sends with 400 Bad Request: chat not found. The code was throwing the raw Axios 400 without Telegram's explanatory description.

  • telegramPush now inspects Telegram's description and throws an actionable error: chat not found → tell the user to open the bot and send /start; blocked → tell them to unblock it; otherwise surface the raw description.
  • /eqnotify register reminds Telegram registrants to message the bot first; README documents the /start-first requirement.

2. /eqnotify list-users (Officer/Knight)

Adds an Officer/Knight-gated subcommand listing everyone registered for EQNotify, showing each subscriber's delivery channel, current Raider status (resolved live, so officers can see who is actually receiving alerts per the #264 gate), and tag count. Reply is ephemeral and chunked to stay within Discord's message length limit for large rosters.

Notes

  • No schema change. Matching/dispatch behavior is unchanged.

Testing

  • yarn tsc — clean.
  • yarn test:ci (eqnotify matcher suite) — 11 tests pass.

🤖 Generated with Claude Code

claude added 2 commits July 24, 2026 15:27
/eqnotify test (and batphone dispatch) surfaced a bare "status code 400"
when Telegram rejected a send. The most common cause is that a Telegram bot
cannot message a user who has not contacted it first, so sends to a freshly
registered chat ID fail with "chat not found".

- telegramPush now inspects Telegram's error `description` and throws an
  actionable message: "chat not found" tells the user to open the bot and
  send /start; "blocked" tells them to unblock it; anything else surfaces
  the raw Telegram description instead of a generic Axios 400.
- /eqnotify register now reminds Telegram registrants to message the bot
  first, and the README documents the requirement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
Adds an Officer/Knight-gated subcommand that lists everyone registered for
EQNotify, showing each subscriber's delivery channel, current Raider status
(resolved live, so officers can see who is actually receiving alerts), and
tag count. Output is ephemeral and chunked to stay within Discord's message
length limit for large rosters.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
@ebm5025 ebm5025 changed the title Surface Telegram delivery errors and guide bot /start EQNotify: Telegram delivery errors + Officer/Knight list-users command Jul 24, 2026
Aligns list-users with add-user / remove-user (Officer/Mod/Knight) instead
of Officer/Knight only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
@ebm5025
ebm5025 merged commit efe522c into main Jul 24, 2026
1 check passed
@ebm5025
ebm5025 deleted the claude/eqnotify-castle-bot-integration-5c7l4s branch July 24, 2026 15:43
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.

2 participants