mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
refactor: role stores (#2478)
* refactor: reduced duplication in role stores * fix docs * fix: typo * most of requested changes * rest of changes * ACTUAL rest of changes * docs * doooocs * reason
This commit is contained in:
@@ -16,12 +16,7 @@ class GuildEmoji extends Emoji {
|
||||
*/
|
||||
this.guild = guild;
|
||||
|
||||
/**
|
||||
* A collection of roles this emoji is active for (empty if all), mapped by role ID
|
||||
* @type {GuildEmojiRoleStore<Snowflake, Role>}
|
||||
*/
|
||||
this.roles = new GuildEmojiRoleStore(this);
|
||||
|
||||
this._roles = [];
|
||||
this._patch(data);
|
||||
}
|
||||
|
||||
@@ -49,6 +44,14 @@ class GuildEmoji extends Emoji {
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of roles this emoji is active for (empty if all), mapped by role ID
|
||||
* @type {GuildEmojiRoleStore<Snowflake, Role>}
|
||||
*/
|
||||
get roles() {
|
||||
return new GuildEmojiRoleStore(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The timestamp the emoji was created at
|
||||
* @type {number}
|
||||
|
||||
Reference in New Issue
Block a user