From 22b1c425ac132b0ff715cdbca4120eff5585d373 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 29 Dec 2016 12:58:39 -0600 Subject: [PATCH] add ClientUser.settings (#1041) * add user settings * Update Ready.js --- src/client/websocket/packets/handlers/Ready.js | 1 + src/structures/ClientUser.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 10bc6b257..6a644ea17 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -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); diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index d526af6a7..35ec22bde 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -43,6 +43,13 @@ class ClientUser extends User { * @type {Collection} */ this.notes = new Collection(); + + /** + * Discord client settings, such as guild positions + * This is only filled when using a user account. + * @type {Object} + */ + this.settings = {}; } edit(data) {