Experimental ClientOptions.fetch_all_members

This commit is contained in:
Amish Shah
2016-08-29 13:54:29 +01:00
parent 001460acc0
commit 144638e746
7 changed files with 52 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ const BeforeReadyWhitelist = [
Constants.WSEvents.READY,
Constants.WSEvents.GUILD_CREATE,
Constants.WSEvents.GUILD_DELETE,
Constants.WSEvents.GUILD_MEMBERS_CHUNK,
];
class WebSocketPacketManager {

View File

@@ -10,6 +10,7 @@ class GuildMembersChunkHandler extends AbstractHandler {
const client = this.packetManager.client;
const guild = client.guilds.get(data.guild_id);
const members = [];
if (guild) {
for (const member of data.members) {
members.push(guild._addMember(member, true));