Skip to content

Commit

Permalink
deploy: d66e10b
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Jul 21, 2023
1 parent 1a0a601 commit 3fda365
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Client.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ <h1>Client.js</h1>

}

if (this.cacheMembers == true) {
if (this.cacheMembers == true || this.cacheMessages == true) {

this.emit("debug", `Sweeping members for GUILD ${guild.id}...`);

Expand All @@ -605,7 +605,7 @@ <h1>Client.js</h1>

});

if (this.cacheUsers == true) {
if (this.cacheUsers == true || this.cacheMessages == true) {

this.emit("debug", "Sweeping users...");

Expand Down
4 changes: 2 additions & 2 deletions structures_Member.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1>structures/Member.js</h1>

class Member {

constructor(client, data, user_id, guild_id, user, nocache = false) {
constructor(client, data, user_id, guild_id, user, nocache = false, ignoreNoCache = false) {

this.client = client;

Expand Down Expand Up @@ -141,7 +141,7 @@ <h1>structures/Member.js</h1>
this._roles.push(BigInt(data.roles[i]));
}

if ((this.id == this.client.user.id) || (nocache == false &amp;&amp; this.client.cacheMembers == true))
if ((this.id == this.client.user.id) || (nocache == false &amp;&amp; (this.client.cacheMembers == true &amp;&amp; ignoreNoCache == false)))
this.client.guilds.cache.get(guild_id)?.members.cache.set(user_id, this);

}
Expand Down
4 changes: 2 additions & 2 deletions structures_Message.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h1>structures/Message.js</h1>
* The message author.
* @type {User?}
*/
this.author = new User(this.client, data.author, !data.webhook_id || nocache);
this.author = new User(this.client, data.author, !data.webhook_id || nocache, true);
else if (existing &amp;&amp; existing.author)
this.author = existing.author;

Expand All @@ -167,7 +167,7 @@ <h1>structures/Message.js</h1>
* The member who sent the message.
* @type {Member?}
*/
this.member = new Member(this.client, data.member, data.author.id, data.guild_id, data.author, nocache);
this.member = new Member(this.client, data.member, data.author.id, data.guild_id, data.author, nocache, true);
else if (data.author)
this.member = this.guild ? this.guild.members.cache.get(data.author.id) : null;
else if (existing &amp;&amp; existing.member)
Expand Down
4 changes: 2 additions & 2 deletions structures_User.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1>structures/User.js</h1>
* @param {Boolean?} nocache Whether the user should be cached or not.
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
constructor(client, data, nocache = false) {
constructor(client, data, nocache = false, ignoreNoCache = false) {

/**
* The client instance.
Expand Down Expand Up @@ -142,7 +142,7 @@ <h1>structures/User.js</h1>
*/
this.cached = (new Date().getTime() / 1000) | 0;

if (nocache == false &amp;&amp; this.client.cacheUsers == true)
if (nocache == false &amp;&amp; (this.client.cacheUsers == true &amp;&amp; ignoreNoCache == false))
this.client.users.cache.set(data.id, this);

}
Expand Down

0 comments on commit 3fda365

Please sign in to comment.