mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
docs: describe private properties (#8879)
* feat: describe private properties * Update packages/discord.js/src/structures/GuildMember.js Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,13 @@ class CachedManager extends DataManager {
|
||||
constructor(client, holds, iterable) {
|
||||
super(client, holds);
|
||||
|
||||
/**
|
||||
* The private cache of items for this manager.
|
||||
* @type {Collection}
|
||||
* @private
|
||||
* @readonly
|
||||
* @name CachedManager#_cache
|
||||
*/
|
||||
Object.defineProperty(this, '_cache', { value: this.client.options.makeCache(this.constructor, this.holds) });
|
||||
|
||||
if (iterable) {
|
||||
|
||||
@@ -54,6 +54,11 @@ class GuildMember extends Base {
|
||||
*/
|
||||
this.communicationDisabledUntilTimestamp = null;
|
||||
|
||||
/**
|
||||
* The role ids of the member
|
||||
* @type {Snowflake[]}
|
||||
* @private
|
||||
*/
|
||||
this._roles = [];
|
||||
if (data) this._patch(data);
|
||||
}
|
||||
|
||||
@@ -141,6 +141,12 @@ class Presence extends Base {
|
||||
*/
|
||||
class Activity {
|
||||
constructor(presence, data) {
|
||||
/**
|
||||
* The presence of the Activity
|
||||
* @type {Presence}
|
||||
* @readonly
|
||||
* @name Activity#presence
|
||||
*/
|
||||
Object.defineProperty(this, 'presence', { value: presence });
|
||||
|
||||
/**
|
||||
@@ -287,6 +293,12 @@ class Activity {
|
||||
*/
|
||||
class RichPresenceAssets {
|
||||
constructor(activity, assets) {
|
||||
/**
|
||||
* The activity of the RichPresenceAssets
|
||||
* @type {Activity}
|
||||
* @readonly
|
||||
* @name RichPresenceAssets#activity
|
||||
*/
|
||||
Object.defineProperty(this, 'activity', { value: activity });
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user