Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: primary constraint on voice state
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Feb 13, 2024
1 parent 9bc2d46 commit 28b2366
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Listeners/Caches/Guilds/GuildCreateListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,21 @@ export class GuildCreateListener extends Listener {
selfStream: voice.self_stream,
selfVideo: voice.self_video,
suppress: voice.suppress
}).onConflictDoUpdate({ target: voiceStates.channelId, set: { sessionId: voice.session_id } });
}).onConflictDoUpdate({
target: voiceStates.memberId,
set: {
channelId: voice.channel_id,
sessionId: voice.session_id,
deaf: voice.deaf,
mute: voice.mute,
requestToSpeakTimestamp: voice.request_to_speak_timestamp,
selfDeaf: voice.self_deaf,
selfMute: voice.self_mute,
selfStream: voice.self_stream,
selfVideo: voice.self_video,
suppress: voice.suppress
}
});
}
}
}
Expand Down

0 comments on commit 28b2366

Please sign in to comment.