Migrate most of the Client Data Store to Clien

This commit is contained in:
Amish Shah
2016-08-19 22:21:30 +01:00
parent ad8b4c7698
commit 82ab92ca2a
31 changed files with 75 additions and 55 deletions

View File

@@ -15,11 +15,12 @@ class DMChannel extends Channel {
setup(data) {
super.setup(data);
const recipient = new User(this.client, data.recipients[0]);
/**
* The recipient on the other end of the DM
* @type {User}
*/
this.recipient = this.client.store.add('users', new User(this.client, data.recipients[0]));
this.recipient = this.client.users.set(recipient.id, recipient);
/**
* The ID of the last sent message, if available
* @type {?String}