mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
Add Invite.expiresAt/expiresTimestamp
This commit is contained in:
parent
1e57c968dd
commit
1a3f5ca6a9
2 changed files with 19 additions and 1 deletions
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}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue