From 9e4c0a506b219eb7842b46dbd534f09c1ea0e3f1 Mon Sep 17 00:00:00 2001 From: Cinnamon <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 25 Jun 2022 10:10:17 +0700 Subject: [PATCH] refactor(GuildMemberManager): Fetch members --- src/managers/GuildMemberManager.js | 31 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js index 74d4ba6..69bdb8f 100644 --- a/src/managers/GuildMemberManager.js +++ b/src/managers/GuildMemberManager.js @@ -490,23 +490,22 @@ class GuildMemberManager extends CachedManager { x += 200; } } - Promise.all( - list.map(l => { - this.guild.shard.send({ - op: type, - d: { - guild_id: this.guild.id, - typing: true, - threads: false, - activities: true, - channels: { - [channel.id]: l, - }, + for (const l of list) { + this.guild.shard.send({ + op: type, + d: { + guild_id: this.guild.id, + typing: true, + threads: false, + activities: true, + channels: { + [channel.id]: l, }, - }); - return true; - }), - ); + thread_member_lists: [], + members: [], + }, + }); + } } const fetchedMembers = new Collection(); let i = 0;