mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Client.readyTime -> readyAt (consistency)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user