Skip to content

Fix odkp attendance decimals and bp overflow button messages - #271

Merged
ebm5025 merged 1 commit into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s
Aug 21, 2026
Merged

Fix odkp attendance decimals and bp overflow button messages#271
ebm5025 merged 1 commit into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s

Conversation

@ebm5025

@ebm5025 ebm5025 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two fixes:

1. /odkp getraidattendance — two decimal places

getRaidAttendence renders through formatAttendanceForMobile, where the attendance percentage used .toFixed(1). Changed it to .toFixed(2) and bumped the column padding (6 → 7) so 100.00% stays aligned. Scoped to this command only — the DKP summary output (formatSummaryForDiscord, used by a different command) is unchanged.

2. /bp send — second overflow button message never displayed

When a batphone location has more than 25 available bots, only the first message of buttons appeared; the follow-up message never showed.

The button-building code (getBotButtonComponents) and the follow-up send loops in /bp send and /bp get already correctly split >25 buttons into multiple valid Discord messages (verified against discord.js 14.25 builders). The real cause was upstream: getBotsForBatphone in bot-prisma.ts had take: 25 on its Prisma query, capping results at 25 bots. With never more than 25 buttons, the overflow logic had nothing to split, so a second message was never generated. Removing the cap lets all available bots render across the paginated messages the code already supports.

Notes

  • With the cap removed, a location with many bots generates one Discord message per 25 buttons (e.g. 60 bots → 3 messages). This is the intended overflow behavior. If an upper bound is preferred to avoid channel spam, it can be added.

Testing

  • tsc --skipLibCheck --noEmit passes clean.
  • Verified button chunking produces valid, correctly-sized messages (≤5 rows / ≤25 buttons each) using the real discord.js builders.

🤖 Generated with Claude Code


Generated by Claude Code

- /odkp getraidattendance now reports attendance percentages to two
  decimal places (formatAttendanceForMobile).
- /bp send (and /bp get) can now display more than 25 bot request
  buttons: getBotsForBatphone was capped at 25 results via `take: 25`,
  so the overflow follow-up message was never generated. Removing the
  cap lets all available bots render across the paginated messages the
  button-building logic already supports.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
@ebm5025
ebm5025 merged commit 0317d63 into main Aug 21, 2026
1 check passed
@ebm5025
ebm5025 deleted the claude/eqnotify-castle-bot-integration-5c7l4s branch August 21, 2026 03:07
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