Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

fix(ApplicationCommandOptions): clean up code for builder options #68

Merged
merged 2 commits into from
Dec 28, 2021

Conversation

vladfrangu
Copy link
Member

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

The previous code was really messy, especially since the types in discord-api-types became much stricter. This PR helps cleanup the internal code by making certain features (like choices) mixins instead of classes you extend directly.

Status and versioning classification:

  • Code changes have been tested, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2021

Codecov Report

Merging #68 (a6f6d92) into main (a9addd5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #68   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        21    -1     
  Lines          291       306   +15     
  Branches        37        42    +5     
=========================================
+ Hits           291       306   +15     
Impacted Files Coverage Δ
src/interactions/slashCommands/Assertions.ts 100.00% <ø> (ø)
.../interactions/slashCommands/SlashCommandBuilder.ts 100.00% <ø> (ø)
.../slashCommands/mixins/SharedSlashCommandOptions.ts 100.00% <ø> (ø)
...eractions/slashCommands/SlashCommandSubcommands.ts 100.00% <100.00%> (ø)
...ashCommands/mixins/ApplicationCommandOptionBase.ts 100.00% <100.00%> (ø)
...ixins/ApplicationCommandOptionChannelTypesMixin.ts 100.00% <100.00%> (ø)
...ionCommandOptionWithChoicesAndAutocompleteMixin.ts 100.00% <100.00%> (ø)
src/interactions/slashCommands/options/boolean.ts 100.00% <100.00%> (ø)
src/interactions/slashCommands/options/channel.ts 100.00% <100.00%> (ø)
src/interactions/slashCommands/options/integer.ts 100.00% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9addd5...a6f6d92. Read the comment docs.

@iCrawl iCrawl merged commit b5d0b15 into main Dec 28, 2021
@iCrawl iCrawl deleted the chore/cleanup-option-builders branch December 28, 2021 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants