mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Add functionality for GuildEmoji events
This commit is contained in:
@@ -103,6 +103,27 @@ class Emoji {
|
||||
return this.requiresColons ? `<:${this.name}:${this.id}>` : this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this emoji is the same as another one
|
||||
* @param {Emoji|Object} other the emoji to compare it to
|
||||
* @returns {boolean} whether the emoji is equal to the given emoji or not
|
||||
*/
|
||||
equals(other) {
|
||||
if (other instanceof Emoji) {
|
||||
return (
|
||||
other.id === this.id &&
|
||||
other.name === this.name &&
|
||||
other.managed === this.managed &&
|
||||
other.requiresColons === this.requiresColons
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
other.id === this.id &&
|
||||
other.name === this.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier of this emoji, used for message reactions
|
||||
* @readonly
|
||||
|
||||
Reference in New Issue
Block a user