From c40c0f934a571c100e4b3aa633a80fe48661d836 Mon Sep 17 00:00:00 2001 From: eeehh Date: Mon, 19 Jul 2021 04:16:48 +1000 Subject: [PATCH] fix(GuildChannel): only fetch invites for the specific channel (#6132) --- src/managers/GuildInviteManager.js | 4 ++-- src/structures/GuildChannel.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/managers/GuildInviteManager.js b/src/managers/GuildInviteManager.js index fb28fdaa9..1317e9e04 100644 --- a/src/managers/GuildInviteManager.js +++ b/src/managers/GuildInviteManager.js @@ -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()); } diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index d5150393e..acbc267c9 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -497,7 +497,7 @@ class GuildChannel extends Channel { * @returns {Promise>} */ fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelID: this.id, cache }); + return this.guild.invites.fetch({ channelId: this.id, cache }); } /**