Client.readyTime -> readyAt (consistency)

This commit is contained in:
Schuyler Cebulskie
2016-10-06 21:48:25 -04:00
parent 93425c3979
commit 79b0d3f2a5
3 changed files with 12 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ class Client extends EventEmitter {
* The date at which the Client was regarded as being in the `READY` state.
* @type {?Date}
*/
this.readyTime = null;
this.readyAt = null;
this._timeouts = new Set();
this._intervals = new Set();
@@ -170,7 +170,7 @@ class Client extends EventEmitter {
* @readonly
*/
get uptime() {
return this.readyTime ? Date.now() - this.readyTime : null;
return this.readyAt ? Date.now() - this.readyAt : null;
}
/**
@@ -195,6 +195,14 @@ class Client extends EventEmitter {
return emojis;
}
/**
* The timestamp that the client was last ready at
* @type {?number}
*/
get readyTimestamp() {
return this.readyAt ? this.readyAt.getTime() : null;
}
/**
* Logs the client in. If successful, resolves with the account's token. <warn>If you're making a bot, it's
* much better to use a bot account rather than a user account.