From cd6497b0a8d712c1c9015c576f9d28280aa577a6 Mon Sep 17 00:00:00 2001 From: eeehh Date: Sun, 18 Jul 2021 13:31:53 +1000 Subject: [PATCH 1/2] fix(GuildChannel): only fetch invites for the specific channel --- src/structures/GuildChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index d5150393e55d..acbc267c915f 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 }); } /** From b30a0eb766dcef3e18776266d6e94bff1de93d67 Mon Sep 17 00:00:00 2001 From: eeehh Date: Sun, 18 Jul 2021 16:10:11 +1000 Subject: [PATCH 2/2] refactor(GuildInviteManager): change channelID to channelId --- src/managers/GuildInviteManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/GuildInviteManager.js b/src/managers/GuildInviteManager.js index fb28fdaa957e..1317e9e04658 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()); }