mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
refactor(GuildMember): make _roles property non-enumerable (#9387)
* refactor(GuildMember): make _roles a getter and roles a normal prop * fix: revert changes * fix: requested changes * fix: requested changes --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -56,10 +56,12 @@ class GuildMember extends Base {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The role ids of the member
|
* The role ids of the member
|
||||||
|
* @name GuildMember#_roles
|
||||||
* @type {Snowflake[]}
|
* @type {Snowflake[]}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._roles = [];
|
Object.defineProperty(this, '_roles', { value: [], writable: true });
|
||||||
|
|
||||||
if (data) this._patch(data);
|
if (data) this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user