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(Webhook): throw an error if no token is available when it's required #5798

Merged
merged 1 commit into from Jun 10, 2021

Conversation

SpaceEEC
Copy link
Member

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

Since Discord started sending application their own webhook's token again, #5731 is somewhat resolved.
This PR does the rest to resolve #5731.

  • Use the optionally supplied token to Client#fetchWebhook if Discord did not include it in the payload. (i.e. fetching another application's webhook by id and token)
  • Document when tokens are missing.
  • Throw a more helpful error when trying to execute a message-related action on a webhook without a token.

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 includes breaking changes (methods removed or renamed, parameters moved or removed)

@iCrawl iCrawl merged commit eb98e33 into discordjs:master Jun 10, 2021
@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.

webhook#send throws DiscordAPIError: 405: Method Not Allowed
4 participants