This commit is contained in:
Travis CI 2016-12-31 02:08:05 +00:00
parent 5381c3214e
commit 609c516c65
2 changed files with 12 additions and 14 deletions

View file

@ -1881,6 +1881,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}
@ -1913,18 +1923,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;
@ -4657,8 +4655,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}`;

File diff suppressed because one or more lines are too long