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): Resolve source guild only if cached #6834

Merged
merged 1 commit into from Oct 16, 2021

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented Oct 14, 2021

Please describe the changes this PR makes and why it should be merged:
This resolves #6773 (tl;dr: checking the .sourceGuild property of a channel follower webhook that the bot is not in (or has cached) yields a weird Guild structure with improperly-set & undefined properties).

I went with the .resolve() approach here as trying to move features out of the BaseGuild and no longer having it abstract would mean that another abstract intermediary guild structure would have to be created just for features, which is a bit much. In addition, if we were to create a SourceGuild structure, it would be somewhat of a copy of the existing BaseGuild, which I don't think is desired.

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 added this to the Version 13.3 milestone Oct 14, 2021
@iCrawl iCrawl merged commit d193d04 into discordjs:main Oct 16, 2021
@Jiralite Jiralite deleted the source-guild-fix branch October 16, 2021 22:58
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.

The source guild of a followed webhook yields a full Guild structure
4 participants