diff --git a/src/client/Client.js b/src/client/Client.js index 965cc5a4f..f08446265 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -100,6 +100,11 @@ class Client extends EventEmitter { * @type {?String} */ this.password = null; + /** + * The time in milliseconds the Client connected + * @type {?Number} + */ + this.readyTime = null; } /** diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 475d9b6eb..217127c77 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -11,6 +11,7 @@ class ReadyHandler extends AbstractHandler { const clientUser = new ClientUser(client, data.user); client.user = clientUser; + client.readyTime = Date.now(); client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) { client.dataManager.newGuild(guild); diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index b8f6b196a..96ff2be4e 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -33,9 +33,11 @@ class GuildChannel extends Channel { super.setup(data); /** * The type of the Guild Channel - * @type {Number} + * @type {String} */ - this.type = data.type; + if (data.type === 0) this.type = 'text'; + else if (data.type === 2) this.type = 'voice'; + else this.type = data.type.toString(); /** * The topic of the Guild Channel, if there is one. * @type {?String}