Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(GuildMember): make _roles property non-enumerable #9387

Merged
merged 8 commits into from
May 18, 2023
4 changes: 3 additions & 1 deletion packages/discord.js/src/structures/GuildMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ class GuildMember extends Base {

/**
* The role ids of the member
* @name GuildMember#_roles
* @type {Snowflake[]}
* @private
*/
this._roles = [];
Object.defineProperty(this, '_roles', { value: [] });
Idris1401 marked this conversation as resolved.
Show resolved Hide resolved

if (data) this._patch(data);
}

Expand Down