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

feat(Interactions): add InteractionWebhook for better internals #5712

Merged
merged 1 commit into from Jun 5, 2021

Conversation

ckohen
Copy link
Member

@ckohen ckohen commented May 31, 2021

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

Currently, interactions create a WebhookClient for handling additional response to the interaction. This works great, except for a few places, such as InteractionResponses#followUp which has to be done without the WebhookClient due to APIMessage not resolving ephemeral as a valid option.

This PR creates an InteractionWebhook, which allows APIMessage to resolve isInteraction more accurately and allows the removal of the inapplicable methods.

Since this PR is touching all of the webhook handling, I have also added the empty functions to the bottom of WebhookClient to allow them to be documented properly.

⚠️ The base for this PR is #5674 as it refactors interactions quite a bit, this will be rebased to master once 5674 is merged.

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
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

@SpaceEEC SpaceEEC marked this pull request as draft May 31, 2021 16:35
@SpaceEEC
Copy link
Member

Keeping this a draft until #5674 is merged then.

@ckohen
Copy link
Member Author

ckohen commented May 31, 2021

🤦 I definitely thought I created it as draft, ty.

@ckohen ckohen force-pushed the separate-interaction-webhook branch 2 times, most recently from 9404d9e to 794e263 Compare June 4, 2021 21:43
@ckohen ckohen marked this pull request as ready for review June 4, 2021 21:44
@iCrawl
Copy link
Member

iCrawl commented Jun 5, 2021

This needs a rebase @ckohen

@ckohen ckohen force-pushed the separate-interaction-webhook branch from 794e263 to 415c013 Compare June 5, 2021 20:58
@iCrawl iCrawl merged commit dec191a into discordjs:master Jun 5, 2021
@ckohen ckohen deleted the separate-interaction-webhook branch June 6, 2021 00:10
@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.

None yet

5 participants