Skip to content
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

fix(SlashCommandBuilder): missing methods in subcommand builder #8583

Merged
merged 1 commit into from Sep 15, 2022

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented Sep 2, 2022

Please describe the changes this PR makes and why it should be merged:
Fixes #8562

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Sep 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Sep 2, 2022 at 7:03PM (UTC)

@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Merging #8583 (8d8a5d6) into main (b7eb96d) will decrease coverage by 13.62%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##              main    #8583       +/-   ##
============================================
- Coverage   100.00%   86.37%   -13.63%     
============================================
  Files           39       87       +48     
  Lines         3015     8610     +5595     
  Branches       406     1107      +701     
============================================
+ Hits          3015     7437     +4422     
- Misses           0     1131     +1131     
- Partials         0       42       +42     
Flag Coverage Δ
builders 100.00% <100.00%> (ø)
collection 100.00% <ø> (?)
proxy 74.10% <ø> (?)
rest 92.00% <ø> (?)
utilities 100.00% <ø> (?)
voice 63.86% <ø> (?)
ws 60.46% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../interactions/slashCommands/SlashCommandBuilder.ts 100.00% <100.00%> (ø)
packages/voice/src/joinVoiceChannel.ts 100.00% <0.00%> (ø)
packages/voice/src/receive/VoiceReceiver.ts 90.56% <0.00%> (ø)
packages/voice/src/networking/VoiceUDPSocket.ts 90.47% <0.00%> (ø)
.../src/strategies/sharding/WorkerShardingStrategy.ts 95.89% <0.00%> (ø)
packages/voice/src/audio/TransformerGraph.ts 74.19% <0.00%> (ø)
...ackages/rest/src/lib/handlers/SequentialHandler.ts 86.03% <0.00%> (ø)
packages/voice/src/DataStore.ts 98.14% <0.00%> (ø)
...src/strategies/context/IContextFetchingStrategy.ts 100.00% <0.00%> (ø)
packages/proxy/src/handlers/proxyRequests.ts 71.64% <0.00%> (ø)
... and 39 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -188,8 +188,7 @@ export class SlashCommandBuilder {
export interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}

export interface SlashCommandSubcommandsOnlyBuilder
extends SharedNameAndDescription,
Pick<SlashCommandBuilder, 'addSubcommand' | 'addSubcommandGroup' | 'toJSON'> {}
extends Omit<SlashCommandBuilder, Exclude<keyof SharedSlashCommandOptions, 'options'>> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only remove the option functions or does it keep them 👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It omits all the methods of the SharedSlashCommandOptions mixin from the SlashCommandBuilder class

@iCrawl iCrawl merged commit 1c5b78f into discordjs:main Sep 15, 2022
@almeidx almeidx deleted the builders/subcommand-builder branch September 15, 2022 18:19
suneettipirneni pushed a commit to suneettipirneni/discord.js that referenced this pull request Sep 17, 2022
suneettipirneni pushed a commit to suneettipirneni/discord.js that referenced this pull request Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Property 'setDMPermission' does not exist on type 'SlashCommandSubcommandsOnlyBuilder'
6 participants