Skip to content

Commit

Permalink
Merge pull request #376 from Blocksnmore/deploy-fix-fix
Browse files Browse the repository at this point in the history
Fix: Fix: correctly handle resolved member objects in interactions payload over http
  • Loading branch information
Helloyunho authored Dec 15, 2023
2 parents e3e3c73 + d743a2f commit b5b573f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/interactions/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export class InteractionsClient extends HarmonyEventEmitter<InteractionsClientEv
client,
data,
resolved.users[id],
undefined as unknown as Guild
guild as Guild
)
}

Expand All @@ -648,11 +648,7 @@ export class InteractionsClient extends HarmonyEventEmitter<InteractionsClientEv
(payload.data as InteractionApplicationCommandData).resolved?.roles ??
{}
)) {
resolved.roles[id] = new Role(
client,
data,
undefined as unknown as Guild
)
resolved.roles[id] = new Role(client, data, guild as Guild)
}

for (const [id, data] of Object.entries(
Expand Down
2 changes: 1 addition & 1 deletion src/structures/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Member extends SnowflakeBase {
perms?: Permissions
) {
super(client)
this.id = data.user.id
this.id = user.id
this.readFromData(data)
this.user = user
this.guild = guild
Expand Down

0 comments on commit b5b573f

Please sign in to comment.