Remove all data stores! Move to maps

This commit is contained in:
Amish Shah
2016-08-19 22:34:59 +01:00
parent 82ab92ca2a
commit 8d5d90e222
17 changed files with 81 additions and 111 deletions

View File

@@ -10,14 +10,14 @@ class ReadyHandler extends AbstractHandler {
const client = this.packetManager.client;
const clientUser = new ClientUser(client, data.user);
client.store.user = clientUser;
client.user = clientUser;
client.users.set(clientUser.id, clientUser);
for (const guild of data.guilds) {
client.store.newGuild(guild);
client.dataManager.newGuild(guild);
}
for (const privateDM of data.private_channels) {
client.store.newChannel(privateDM);
client.dataManager.newChannel(privateDM);
}
this.packetManager.ws.sessionID = data.session_id;