Skip to content

Commit

Permalink
fix(GuildChannel): only fetch invites for the specific channel (#6132)
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnniie committed Jul 18, 2021
1 parent f293132 commit c40c0f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/managers/GuildInviteManager.js
Expand Up @@ -146,8 +146,8 @@ class GuildInviteManager extends CachedManager {
return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection());
}

async _fetchChannelMany(channelID, cache) {
const data = await this.client.api.channels(channelID).invites.get();
async _fetchChannelMany(channelId, cache) {
const data = await this.client.api.channels(channelId).invites.get();
return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection());
}

Expand Down
2 changes: 1 addition & 1 deletion src/structures/GuildChannel.js
Expand Up @@ -497,7 +497,7 @@ class GuildChannel extends Channel {
* @returns {Promise<Collection<string, Invite>>}
*/
fetchInvites(cache = true) {
return this.guild.invites.fetch({ channelID: this.id, cache });
return this.guild.invites.fetch({ channelId: this.id, cache });
}

/**
Expand Down

0 comments on commit c40c0f9

Please sign in to comment.