brackt/app/services/__tests__
Chris Parsons c71eb69648
Add Discord notifications for draft order changes (#441)
* Add Discord notification when draft order is set or randomized

Posts the full draft order to the league's Discord webhook after each
set-draft-order or randomize-draft-order action, with distinct titles
(📋 vs 🎲) so members can tell how it was determined.

https://claude.ai/code/session_01XrBxu358RK6q8iDgRQbMFx

* Refine Discord draft order notification: league name/link, usernames, polish

- Replace seasonName with leagueName + leagueUrl; title links to the league
- Distinguish manual vs randomized in title ("Manually Set" vs "Randomized")
- Show owner username next to each team name in the draft order list
- Remove footer in favour of the linked embed title
- Add 4096-char description clamp consistent with standings notification
- Use a teamMap in both intent branches to avoid O(n²) find-in-loop
- Add test for all-unowned-teams rendering no trailing parentheses

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove emoji from draft order notification titles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-17 23:20:51 -07:00
..
bracket-simulator.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
discord.test.ts Add Discord notifications for draft order changes (#441) 2026-05-17 23:20:51 -07:00
ev-calculator.test.ts feat: add calculateReplacementLevel and calculateVORP to ev-calculator 2026-04-09 01:59:46 +00:00
icm-calculator.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
probability-engine.test.ts Add projected-wins input mode to admin Elo Ratings page (#306) 2026-04-17 12:40:08 -07:00
probability-updater.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
sync-tournament-results.test.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00