From 054d4655c1a3142663ea63cf4cc001adb2da7e01 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Dec 2016 21:05:34 -0500 Subject: [PATCH] Rearrange identifier --- src/structures/Emoji.js | 22 ++++++++++------------ src/structures/ReactionEmoji.js | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index d8a62e17e..6cd39f661 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -91,6 +91,16 @@ class Emoji { return Constants.Endpoints.emoji(this.id); } + /** + * The identifier of this emoji, used for message reactions + * @type {string} + * @readonly + */ + get identifier() { + if (this.id) return `${this.name}:${this.id}`; + return encodeURIComponent(this.name); + } + /** * When concatenated with a string, this automatically returns the emoji mention rather than the object. * @returns {string} @@ -123,18 +133,6 @@ class Emoji { ); } } - - /** - * The identifier of this emoji, used for message reactions - * @readonly - * @type {string} - */ - get identifier() { - if (this.id) { - return `${this.name}:${this.id}`; - } - return encodeURIComponent(this.name); - } } module.exports = Emoji; diff --git a/src/structures/ReactionEmoji.js b/src/structures/ReactionEmoji.js index b6d2cdbd6..58d00b9b8 100644 --- a/src/structures/ReactionEmoji.js +++ b/src/structures/ReactionEmoji.js @@ -26,8 +26,8 @@ class ReactionEmoji { /** * The identifier of this emoji, used for message reactions - * @readonly * @type {string} + * @readonly */ get identifier() { if (this.id) return `${this.name}:${this.id}`;