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(Message): prevent fetching an interaction webhook. #6468

Merged
merged 1 commit into from Aug 23, 2021
Merged

feat(Message): prevent fetching an interaction webhook. #6468

merged 1 commit into from Aug 23, 2021

Conversation

fasterplayer
Copy link
Contributor

@fasterplayer fasterplayer commented Aug 18, 2021

Please describe the changes this PR makes and why it should be merged:
After some testings, it seems that we can't use .fetchWebhook() on a message that was sent by an application (interaction). The way so check this is by comparing the applicationId in the message and the webhookId. If they match, this means that the message comes from an interaction and the webhook behind it cannot be fetched from the api.

The api returns DiscordAPIError: Unknown Webhook

Correct me if i'm wrong but i think that it's not possible to send webhooks from an applicationId except through interactions.

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

@iCrawl iCrawl changed the title feat(Message): Prevent fetching an interaction webhook. feat(Message): prevent fetching an interaction webhook. Aug 23, 2021
@iCrawl iCrawl merged commit f39b597 into discordjs:main Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants