mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Rearrange identifier
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user