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

docs: add new typedef to properly doc InteractionReplyOptions #5632

Merged
merged 2 commits into from
May 26, 2021

Conversation

iShibi
Copy link
Contributor

@iShibi iShibi commented May 14, 2021

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

ℹ️ Preview: https://preview-5632.netlify.app

Currently, InteractionReplyOptions extends jsdoc of WebhookMessageOptions which results in a slightly wrong documentation as the latter one has some extra fields. The reason @vaporox gave for not making a new typedef from scratch for it was "code duplication". Which is correct because MessageOptions, WebhookMessageOptions, and ReplyMessageOptions all have a lot of common fields and these fields are documented for each of them.

This PR adds a new typedef BaseMessageOptions that contains fields that are common among the above typedefs. The above mentioned typedefs now extend this new typedef, making documention correct while keeping the code duplication at minimum.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@iCrawl iCrawl merged commit 3589e0f into discordjs:master May 26, 2021
@iShibi iShibi deleted the base-msg-options branch May 30, 2021 10:21
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants