Add <User/Guild/Role/Channel>.createdAt (#620)

* Add Role.createdAt

* Add Channel.createdAt

* Add Guild.createdAt

* Add User.createdAt

* Change createdAt to Unix Timestamp

* Add createdAt to Emojis

* Change createdAt to Unix Timestamp
This commit is contained in:
HyperCoder
2016-09-05 10:59:27 -04:00
committed by Amish Shah
parent 6dfe160c52
commit 943767dc83
5 changed files with 45 additions and 0 deletions

View File

@@ -43,6 +43,15 @@ class Emoji {
this.managed = data.managed;
}
/**
* The unix timestamp the emoji was created
* @readonly
* @type {Date}
*/
get createdAt() {
return new Date((+this.id / 4194304) + 1420070400000).getTime();
}
/**
* A collection of roles this emoji is active for (empty if all), mapped by role ID.
* @type {Collection<string, Role>}