Skip to content

Commit

Permalink
add ClientUser.settings (#1041)
Browse files Browse the repository at this point in the history
* add user settings

* Update Ready.js
  • Loading branch information
devsnek authored and amishshah committed Dec 29, 2016
1 parent ebd2f0e commit 22b1c42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client/websocket/packets/handlers/Ready.js
Expand Up @@ -10,6 +10,7 @@ class ReadyHandler extends AbstractHandler {
client.ws.heartbeat();

const clientUser = new ClientUser(client, data.user);
clientUser.settings = data.user_settings;
client.user = clientUser;
client.readyAt = new Date();
client.users.set(clientUser.id, clientUser);
Expand Down
7 changes: 7 additions & 0 deletions src/structures/ClientUser.js
Expand Up @@ -43,6 +43,13 @@ class ClientUser extends User {
* @type {Collection<string, string>}
*/
this.notes = new Collection();

/**
* Discord client settings, such as guild positions
* <warn>This is only filled when using a user account.</warn>
* @type {Object}
*/
this.settings = {};
}

edit(data) {
Expand Down

0 comments on commit 22b1c42

Please sign in to comment.