Skip to content

Commit

Permalink
fix(ReadyHandler): don't create new guild instances for already exist…
Browse files Browse the repository at this point in the history
…ing guilds

See: #2319, #2332
  • Loading branch information
SpaceEEC committed Feb 21, 2018
1 parent be40858 commit dc92582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/websocket/packets/handlers/Ready.js
Expand Up @@ -17,7 +17,7 @@ class ReadyHandler extends AbstractHandler {
client.readyAt = new Date();
client.users.set(clientUser.id, clientUser);

for (const guild of data.guilds) client.dataManager.newGuild(guild);
for (const guild of data.guilds) if (!client.guilds.has(guild.id)) client.dataManager.newGuild(guild);
for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM);

for (const relation of data.relationships) {
Expand Down

0 comments on commit dc92582

Please sign in to comment.