Skip to content

Commit

Permalink
fix user
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Nov 15, 2024
1 parent a77a5a8 commit 2a3feef
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/gateway/eventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ class EventHandler {
const member = new Member(this.#_client, data, {
userId: data.user.id,
guildId: data.guild_id,
user: data.user,
});

member.guild.incrementMemberCount();
Expand Down Expand Up @@ -346,7 +345,6 @@ class EventHandler {
const newMember = new Member(this.#_client, data, {
userId: data.user.id,
guildId: data.guild_id,
user: data.user,
});

this.#_client.emit(EVENTS.GUILD_MEMBER_UPDATE, oldMember, newMember);
Expand All @@ -363,7 +361,6 @@ class EventHandler {
new Member(this.#_client, data.members[i], {
userId: data.members[i].user.id,
guildId: data.guild_id,
user: data.members[i].user,
});
}

Expand Down
2 changes: 0 additions & 2 deletions src/managers/GuildMemberManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class GuildMemberManager extends BaseCacheManager {
return new Member(client, data, {
userId,
guildId,
user: data.user,
});
}

Expand Down Expand Up @@ -186,7 +185,6 @@ class GuildMemberManager extends BaseCacheManager {
new Member(client, data[i], {
userId: data[i].user.id,
guildId,
user: data[i].user,
}),
);

Expand Down
1 change: 0 additions & 1 deletion src/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ class Guild {
new Member(this.#_client, data.members[i], {
userId: data.members[i].user.id,
guildId: data.id,
user: data.members[i].user,
nocache,
});

Expand Down
3 changes: 2 additions & 1 deletion src/structures/SlashCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import util from "util";
import Member from "./Member.js";
import Role from "./Role.js";
import cacheChannel from "../util/gluon/cacheChannel.js";
import User from "./User.js";

/**
* Represents a slash command.
Expand Down Expand Up @@ -40,7 +41,7 @@ class SlashCommand extends Interaction {
new Member(client, value, {
userId: key,
guildId: data.guild_id,
user: data.data.resolved.users[key],
user: new User(client, data.data.resolved.users[key]),
});
if (data.data.resolved?.roles)
for (const value of Object.values(data.data.resolved.roles))
Expand Down
1 change: 0 additions & 1 deletion src/structures/VoiceState.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class VoiceState {
this.#member = new Member(this.#_client, data.member, {
userId: data.user_id,
guildId: data.guild_id,
user: data.member.user,
nocache,
});
else this.#member = this.guild?.members.get(data.user_id) || null;
Expand Down

0 comments on commit 2a3feef

Please sign in to comment.