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(GuildChannel): only fetch invites for the specific channel #6132

Merged
merged 2 commits into from Jul 18, 2021
Merged

fix(GuildChannel): only fetch invites for the specific channel #6132

merged 2 commits into from Jul 18, 2021

Conversation

dawnniie
Copy link
Contributor

@dawnniie dawnniie commented Jul 18, 2021

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

Following the renaming of ID properties to Id (#6036), this particular instance was missed, which cases GuildChannel#fetchInvites to fetch all invites from the guild rather than just the specific channel.

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)

@kyranet
Copy link
Member

kyranet commented Jul 18, 2021

As a side note, that line comes from #5889, which landed at 4th July 23:53, #6036 landed at 4th July 20:54, roughly 3 hours earlier, so it wasn't an oversight, just concurrency 101 😅

I just scanned for IDs again, and found those two references of xID that need renaming:

async _fetchChannelMany(channelID, cache) {
const data = await this.client.api.channels(channelID).invites.get();

@dawnniie
Copy link
Contributor Author

Oh, that makes a lot more sense! I assume some kind of regex find/replace was used for that PR, so it was a little surprising to see something missed. I'll go ahead and fix those instances as well.

@kyranet
Copy link
Member

kyranet commented Jul 18, 2021

Yes - [a-z]ID with case sensitive and regex search in VSCode:

Screenshot of results (master branch)

image

@iCrawl iCrawl merged commit c40c0f9 into discordjs:master Jul 18, 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