mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Cleanup Part 2: Electric Boogaloo (Reloaded) (#594)
* Cleanup Part 2: Electric Boogaloo (Reloaded) * Moar cleanup * Tweak NOT_A_PERMISSION error
This commit is contained in:
committed by
Amish Shah
parent
5a9c42061f
commit
0b908f5bce
@@ -1,5 +1,5 @@
|
||||
const Collection = require('../util/Collection');
|
||||
const Constants = require('../util/Constants');
|
||||
const Collection = require('../util/Collection');
|
||||
|
||||
/**
|
||||
* Represents a Custom Emoji
|
||||
@@ -44,16 +44,14 @@ class Emoji {
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of roles this emoji is active for (empty if all). Mapped by role ID.
|
||||
* A collection of roles this emoji is active for (empty if all), mapped by role ID.
|
||||
* @type {Collection<string, Role>}
|
||||
* @readonly
|
||||
*/
|
||||
get roles() {
|
||||
const roles = new Collection();
|
||||
for (const role of this.roleIDS) {
|
||||
if (this.guild.roles.get(role)) {
|
||||
roles.set(role, this.guild.roles.get(role));
|
||||
}
|
||||
if (this.guild.roles.get(role)) roles.set(role, this.guild.roles.get(role));
|
||||
}
|
||||
return roles;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user