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

feat(SlashCommandBuilder): add autocomplete #53

Merged
merged 6 commits into from
Dec 2, 2021

Conversation

Khasms
Copy link
Contributor

@Khasms Khasms commented Oct 30, 2021

Please describe the changes this PR makes and why it should be merged:
I figured out the types so I'm back. Adds support for autocompletion.

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)

Copy link
Member

@iCrawl iCrawl left a comment

Choose a reason for hiding this comment

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

Some tiny nits.

Maybe add test cases to the methods where you check if an error is thrown, should both choices and autocomplete be provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2021

Codecov Report

Merging #53 (db1cf79) into main (0b6fb81) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #53   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          264       276   +12     
  Branches        33        37    +4     
=========================================
+ Hits           264       276   +12     
Impacted Files Coverage Δ
...nteractions/slashCommands/mixins/CommandOptions.ts 100.00% <ø> (ø)
...s/slashCommands/mixins/CommandOptionWithChoices.ts 100.00% <100.00%> (ø)

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 0b6fb81...db1cf79. Read the comment docs.

@Khasms
Copy link
Contributor Author

Khasms commented Oct 30, 2021

Some tiny nits.

Maybe add test cases to the methods where you check if an error is thrown, should both choices and autocomplete be provided.

My bad, I had already written the tests but forgot to commit them.

@iCrawl
Copy link
Member

iCrawl commented Oct 30, 2021

Can you also add some for the other 2 methods + toJSON?

Copy link

@jqcktalks jqcktalks left a comment

Choose a reason for hiding this comment

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

yes

@callumok2004
Copy link

Any ETA when this will be merged?

@callumok2004

This comment has been minimized.

@weirdG22

This comment has been minimized.

@iCrawl iCrawl merged commit 05b07a7 into discordjs:main Dec 2, 2021
@Khasms Khasms deleted the feat/autocomplete-2 branch December 11, 2021 09:01
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.

None yet