-
-
Notifications
You must be signed in to change notification settings - Fork 4k
feat: components v2 in v14 #10781
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
base: v14
Are you sure you want to change the base?
feat: components v2 in v14 #10781
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
e6541fb
to
8835fd6
Compare
packages/discord.js/src/structures/interfaces/TextBasedChannel.js
Outdated
Show resolved
Hide resolved
packages/discord.js/src/structures/interfaces/TextBasedChannel.js
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v14 #10781 +/- ##
=======================================
Coverage 35.51% 35.51%
=======================================
Files 228 228
Lines 14317 14319 +2
Branches 1255 1255
=======================================
+ Hits 5084 5086 +2
Misses 9189 9189
Partials 44 44
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:
|
Co-authored-by: Naiyar <[email protected]>
return this.components.flatMap(row => row.components).find(component => component.customId === customId) ?? null; | ||
return ( | ||
this.components | ||
.flatMap(component => { |
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.
This flatMap
callback pops up twice, maybe worth considering making it a helper somewhere
packages/discord.js/src/structures/interfaces/TextBasedChannel.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Jiralite <[email protected]>
/** | ||
* @external APIMessageTopLevelComponent | ||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessageTopLevelComponent} | ||
*/ |
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.
/** | |
* @external APIMessageTopLevelComponent | |
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessageTopLevelComponent} | |
*/ | |
/** | |
* @external APIMessageTopLevelComponent | |
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageTopLevelComponent} | |
*/ |
Please describe the changes this PR makes and why it should be merged:
Implements Components v2 into mainlib v14.
Only raw JSON data is supported yet, builders not included.
Depends on
Will need a builders v1 release too, since that discord-api-types PR is breaking and some types builders use have been renamed. But since builders v1 is on another branch it has to be another PR.
TODO: uncomment the currently commented type tests that fail because of wrong builders version once builders PR is done, merged and released; also bump builders version to that release.
Status and versioning classification: