-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(structure): add voice structure #11400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(structure): add voice structure #11400
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
📝 WalkthroughWalkthroughIntroduces two new structure classes—VoiceRegion and VoiceState—representing Discord voice API objects. Both extend the base Structure class with type-safe getters for accessing voice-related properties. The classes are then re-exported through the voice module and main package index. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11400 +/- ##
==========================================
- Coverage 31.75% 31.66% -0.10%
==========================================
Files 381 383 +2
Lines 13860 13900 +40
Branches 1095 1095
==========================================
Hits 4401 4401
- Misses 9325 9365 +40
Partials 134 134
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/structures/src/index.ts`:
- Line 15: Move the voice module export so it sits with the other domain module
exports for consistent alphabetical grouping: locate the line "export * from
'./voice/index.js';" in packages/structures/src/index.ts and cut it from after
the core exports (Structure.js, Mixin.js, utils/optimization.js) then paste it
into the block containing domain module exports (automoderation through users)
immediately after the users export so the domain exports remain alphabetically
ordered.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
packages/structures/src/index.tspackages/structures/src/voice/VoiceRegion.tspackages/structures/src/voice/VoiceState.tspackages/structures/src/voice/index.ts
🧰 Additional context used
🧬 Code graph analysis (2)
packages/structures/src/voice/VoiceRegion.ts (1)
packages/structures/src/utils/symbols.ts (1)
kData(1-1)
packages/structures/src/voice/VoiceState.ts (2)
packages/voice/scripts/postbuild.mjs (1)
data(3-3)packages/structures/src/utils/symbols.ts (1)
kData(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Tests
🔇 Additional comments (3)
packages/structures/src/voice/VoiceRegion.ts (1)
1-58: LGTM!The
VoiceRegionclass correctly follows the established structure pattern. All getters properly map toAPIVoiceRegionfields via thekDatasymbol, and the generic type parameter for omitted fields is correctly implemented.packages/structures/src/voice/VoiceState.ts (1)
1-108: LGTM!The
VoiceStateclass correctly implements all primitive fields fromAPIVoiceStatewith proper snake_case to camelCase conversion. The design decision to defer the nestedmember(GuildMember) substructure to extending classes is appropriately documented in the JSDoc remarks.packages/structures/src/voice/index.ts (1)
1-2: LGTM!Standard barrel file re-exporting both voice structures.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Qjuh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from the sorting issue in index.ts pointed out by coderabbit.
This PR will add the
VoiceStateandVoiceRegionstructures.Mentioning #10981 for visibility.