diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 1a86aac1b..d91734bf4 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -1,5 +1,6 @@ const Constants = require('../util/Constants'); const Collection = require('../util/Collection'); +const Permissions = require('../util/Permissions'); const Snowflake = require('../util/Snowflake'); /** @@ -76,6 +77,15 @@ class Emoji { return new Date(this.createdTimestamp); } + /** + * Whether the moej is deletable by the client user + * @type {boolean} + * @readonly + */ + get deletable() { + return !this.managed && this.guild.me.hasPermission(Permissions.FLAGS.MANAGE_EMOJIS); + } + /** * A collection of roles this emoji is active for (empty if all), mapped by role ID * @type {Collection}