Fix odkp attendance decimals and bp overflow button messages - #271
Merged
Conversation
- /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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes:
1.
/odkp getraidattendance— two decimal placesgetRaidAttendencerenders throughformatAttendanceForMobile, where the attendance percentage used.toFixed(1). Changed it to.toFixed(2)and bumped the column padding (6 → 7) so100.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 displayedWhen 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 sendand/bp getalready correctly split >25 buttons into multiple valid Discord messages (verified against discord.js 14.25 builders). The real cause was upstream:getBotsForBatphoneinbot-prisma.tshadtake: 25on 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
Testing
tsc --skipLibCheck --noEmitpasses clean.🤖 Generated with Claude Code
Generated by Claude Code