discord.js
discord.js copied to clipboard
feat: add `applicationCommandMention()` formatter
Please describe the changes this PR makes and why it should be merged:
- Added
applicationCommandMention()formatted in /builders - Added
ApplicationCommand#toString(), which will use the function mentioned above to return the commands mention
Upstream:
- discord/discord-api-docs#5186
Status and versioning classification:
- This PR changes the library's interface (methods or parameters added)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| discord-js | ✅ Ready (Inspect) | Visit Preview | Jul 27, 2022 at 0:03AM (UTC) |
Codecov Report
Merging #8280 (a59d422) into main (ba6797e) will increase coverage by
0.11%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #8280 +/- ##
==========================================
+ Coverage 86.40% 86.51% +0.11%
==========================================
Files 87 87
Lines 8221 8290 +69
Branches 1098 1102 +4
==========================================
+ Hits 7103 7172 +69
Misses 1075 1075
Partials 43 43
| Flag | Coverage Δ | |
|---|---|---|
| builders | 100.00% <100.00%> (ø) |
|
| collection | 100.00% <ø> (ø) |
|
| proxy | 73.28% <ø> (ø) |
|
| rest | 92.53% <ø> (ø) |
|
| utilities | 100.00% <ø> (ø) |
|
| voice | 64.08% <ø> (ø) |
|
| ws | 60.26% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/builders/src/messages/formatters.ts | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us.
This PR needs a rebase.
Rebased
This should also be used in https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/structures/ChatInputCommandInteraction.js
This should also be used in https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/structures/ChatInputCommandInteraction.js
You cannot include options in command mentions
This should also be used in https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/structures/ChatInputCommandInteraction.js
You cannot include options in command mentions
That's true, but now that there are attachment options, ChatInputCommandInteraction#toString is not 100% working anymore, and now that there is an official application command mention format, I feel like we should use the official method instead of a custom, not fully working one.
Can't reopen this pull request now. Made a new one, #8546