feat(Emoji): move createdAt and createdTimestamp getters from GuildEmoji (#2872)

This commit is contained in:
SpaceEEC
2018-10-10 10:01:23 +02:00
committed by GitHub
parent 1ee417cd65
commit 71c04a303a
3 changed files with 24 additions and 21 deletions

View File

@@ -1,7 +1,6 @@
const GuildEmojiRoleStore = require('../stores/GuildEmojiRoleStore');
const Permissions = require('../util/Permissions');
const { Error } = require('../errors');
const Snowflake = require('../util/Snowflake');
const Emoji = require('./Emoji');
/**
@@ -65,24 +64,6 @@ class GuildEmoji extends Emoji {
return new GuildEmojiRoleStore(this);
}
/**
* The timestamp the emoji was created at
* @type {number}
* @readonly
*/
get createdTimestamp() {
return Snowflake.deconstruct(this.id).timestamp;
}
/**
* The time the emoji was created at
* @type {Date}
* @readonly
*/
get createdAt() {
return new Date(this.createdTimestamp);
}
/**
* Fetches the author for this emoji
* @returns {Promise<User>}