src: Client#readyAt should be updated when triggerReady is called (#3234)

This commit is contained in:
Vlad Frangu
2019-04-29 19:03:29 +03:00
committed by Amish Shah
parent aa253d9551
commit bc31746621
2 changed files with 3 additions and 1 deletions

View File

@@ -424,8 +424,11 @@ class WebSocketManager {
this.debug('Tried to mark self as ready, but already ready');
return;
}
this.status = Status.READY;
this.client.readyAt = new Date();
/**
* Emitted when the client becomes ready to start working.
* @event Client#ready

View File

@@ -6,7 +6,6 @@ module.exports = (client, { d: data }, shard) => {
if (!ClientUser) ClientUser = require('../../../structures/ClientUser');
const clientUser = new ClientUser(client, data.user);
client.user = clientUser;
client.readyAt = new Date();
client.users.set(clientUser.id, clientUser);
for (const guild of data.guilds) {