Skip to content

refactor: extract duplicated patterns into shared helpers#20

Merged
nathanialhenniges merged 1 commit intomainfrom
FLUFF-refactor-extract-helpers
Mar 22, 2026
Merged

refactor: extract duplicated patterns into shared helpers#20
nathanialhenniges merged 1 commit intomainfrom
FLUFF-refactor-extract-helpers

Conversation

@nathanialhenniges
Copy link
Copy Markdown
Member

Summary

  • Created 4 shared helper utilities (safeErrorReply, requireOwner, sendToMainChannel, updateGuildPremiumStatus) to replace copy-pasted patterns
  • Updated 28 source files to use the new helpers, removing ~200 lines of duplicated code
  • All 228 tests pass, typecheck clean, lint clean

Test plan

  • bun run typecheck passes
  • bun test — 228 tests, 0 failures
  • bun run lint passes

🤖 Generated with Claude Code

Create 4 shared helpers (safeErrorReply, requireOwner, sendToMainChannel,
updateGuildPremiumStatus) to replace copy-pasted patterns across 28 files,
removing ~200 lines of duplicated code while preserving identical behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

Warning

Rate limit exceeded

@nathanialhenniges has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 0 seconds before requesting another review.

⌛ 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: 9de40e24-1a80-47fc-8ace-5f662cc1dc6d

📥 Commits

Reviewing files that changed from the base of the PR and between b41a344 and 251584c.

📒 Files selected for processing (32)
  • src/commands/about.ts
  • src/commands/admin/activity/create.ts
  • src/commands/admin/activity/list.ts
  • src/commands/admin/activity/remove.ts
  • src/commands/admin/index.ts
  • src/commands/admin/quote/create.ts
  • src/commands/admin/quote/list.ts
  • src/commands/admin/quote/remove.ts
  • src/commands/admin/suggestion/approve.ts
  • src/commands/admin/suggestion/list.ts
  • src/commands/admin/suggestion/reject.ts
  • src/commands/admin/suggestion/stats.ts
  • src/commands/changelog.ts
  • src/commands/help.ts
  • src/commands/invite.ts
  • src/commands/owner/index.ts
  • src/commands/owner/premium/testCreate.ts
  • src/commands/owner/premium/testDelete.ts
  • src/commands/owner/premium/testList.ts
  • src/commands/premium.ts
  • src/commands/quote.ts
  • src/commands/setup/channel.ts
  • src/commands/setup/index.ts
  • src/commands/setup/schedule.ts
  • src/commands/suggestion.ts
  • src/events/entitlementCreate.ts
  • src/events/entitlementDelete.ts
  • src/events/entitlementUpdate.ts
  • src/utils/commandErrors.ts
  • src/utils/entitlementHelpers.ts
  • src/utils/mainChannel.ts
  • src/utils/ownerGuard.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FLUFF-refactor-extract-helpers

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.

@nathanialhenniges nathanialhenniges merged commit 7801952 into main Mar 22, 2026
5 checks passed
@nathanialhenniges nathanialhenniges deleted the FLUFF-refactor-extract-helpers branch March 22, 2026 17:01
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.

1 participant