- Extract markEliminatedAndAnnounce helper, removing the duplicated
load-existing-results / collect-newly-eliminated / gated-recalc pattern
from the generate-bracket, generate-groups, and populate-knockout intents.
- Wrap the Discord announcement in a log-only try/catch so a failed
standings recalc/snapshot never fails the (already-committed) bracket
generation action.
- Drop eventId from the elimination recalc call so announcements don't pull
in unrelated completed matches as Scored Matches.
- Hoist the per-season draftPicks lookup in recalculateAffectedLeagues so the
scored-match and elimination sections share one query.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5gLy3K9vW65ogG8GTCjWE
Teams that miss the playoffs (NBA-style brackets) or are knocked out in the
group stage (FIFA group->knockout) were correctly marked eliminated but never
announced to league Discord channels — the elimination intents never called
recalculateAffectedLeagues, and these 0-pt eliminations have no score delta or
match to surface in the existing scored-match/standings sections.
Add an 'Eliminated' section to the standings-update embed and feed newly
eliminated drafted participants through recalculateAffectedLeagues via a new
eliminatedParticipantIds option. Wire it into generate-bracket, generate-groups,
and populate-knockout, gated to fantasy events only (qualifying-point majors like
tennis/CS2 are excluded) and scoped to participants newly eliminated by the run.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5gLy3K9vW65ogG8GTCjWE