mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Add Invite.expiresAt/expiresTimestamp
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -108,6 +108,24 @@ class Invite {
|
|||||||
return new Date(this.createdTimestamp);
|
return new Date(this.createdTimestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The timestamp the invite will expire at
|
||||||
|
* @type {number}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
get expiresTimestamp() {
|
||||||
|
return this.createdTimestamp + (this.maxAge * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The time the invite will expire
|
||||||
|
* @type {Date}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
get expiresAt() {
|
||||||
|
return new Date(this.expiresTimestamp);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL to the invite
|
* The URL to the invite
|
||||||
* @type {string}
|
* @type {string}
|
||||||
|
|||||||
Reference in New Issue
Block a user