Skip to content

feat(bot): /birthday list — next 5 upcoming birthdays - #742

Merged
LucasSantana-Dev merged 9 commits into
mainfrom
feature/birthday-list
Apr 22, 2026
Merged

LucasSantana-Dev merged 9 commits into
mainfrom
feature/birthday-list

Conversation

@LucasSantana-Dev

Copy link
Copy Markdown
Owner

Summary

Adds a read-only `/birthday list` subcommand to the existing `/birthday` command. Completes the user-facing surface (set / clear / channel / list).

  • Queries `MemberBirthday` for the guild
  • Ranks by `daysUntilBirthday(now, month, day)` (new pure helper, year-rollover aware)
  • Shows top 5 with a relative label: today / tomorrow / in N days
  • Footer shows "Showing X of N" so large guilds know there's more
  • `allowedMentions: { parse: [] }` — never pings users in the list

Test plan

  • `npx tsc --noEmit` in `packages/bot` → clean
  • 15 unit tests pass (7 new: 3 `daysUntilBirthday` + 4 list subcommand cases covering empty state, cap at 5, today label, no-mention output)
  • Deploy → `/birthday list` returns embed with correct ordering

Stacking

Branches off main (#738 state). `/birthday channel` from #740 is additive on the SlashCommandBuilder; GitHub will auto-merge the two subcommand lists cleanly.

Adds a read-only subcommand to the existing /birthday command:

- /birthday list — queries MemberBirthday for the guild, ranks by
  daysUntilBirthday(now, month, day), shows top 5 with relative label
  ("today", "tomorrow", "in N days")
- Embed includes "Showing X of N" footer so large guilds know there's more
- allowedMentions: { parse: [] } — never pings users when listing

New helper: daysUntilBirthday(from, month, day)
- Handles year rollover (past dates in this calendar year → next year)
- Pure function, exported for direct testing

Tests: 7 new cases (3 for daysUntilBirthday + 4 for the list subcommand)
pushing the file to 15 passing total.

Plays cleanly atop #740 (the scheduler + /birthday channel PR) since the
only shared surface is the SlashCommandBuilder subcommand list — merges
additively.
@coderabbitai

coderabbitai Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 54 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 54 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60941f66-de50-4acd-bce2-77616e98eaf4

📥 Commits

Reviewing files that changed from the base of the PR and between 77556b8 and 9442299.

📒 Files selected for processing (2)
  • packages/bot/src/functions/general/commands/birthday.spec.ts
  • packages/bot/src/functions/general/commands/birthday.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/birthday-list

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) April 20, 2026 03:31
@vercel

vercel Bot commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 22, 2026 5:07am

Request Review

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit a03dfc5 into main Apr 22, 2026
12 checks passed
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
Adds a read-only subcommand to the existing /birthday command:

- /birthday list — queries MemberBirthday for the guild, ranks by
  daysUntilBirthday(now, month, day), shows top 5 with relative label
  ("today", "tomorrow", "in N days")
- Embed includes "Showing X of N" footer so large guilds know there's more
- allowedMentions: { parse: [] } — never pings users when listing

New helper: daysUntilBirthday(from, month, day)
- Handles year rollover (past dates in this calendar year → next year)
- Pure function, exported for direct testing

Tests: 7 new cases (3 for daysUntilBirthday + 4 for the list subcommand)
pushing the file to 15 passing total.

Plays cleanly atop #740 (the scheduler + /birthday channel PR) since the
only shared surface is the SlashCommandBuilder subcommand list — merges
additively.
@LucasSantana-Dev
LucasSantana-Dev deleted the feature/birthday-list branch May 14, 2026 02:02

This branch was successfully deployed

1 active deployment
Preview — 9442299b Deployed Apr 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant