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

fix(GuildCreate): cache initial voice states to voice caches #241

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Listeners/Caches/Guilds/GuildCreateListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class GuildCreateListener extends Listener {

if (stateVoices) {
for (const voice of payload.data.d.voice_states) {
await this.store.redis.set(GenKey(RedisKey.ROLE_KEY, voice.user_id, payload.data.d.id), JSON.stringify(voice));
await this.store.redis.sadd(GenKey(`${RedisKey.ROLE_KEY}${RedisKey.KEYS_SUFFIX}`, payload.data.d.id), GenKey(`${RedisKey.VOICE_KEY}`, voice.user_id, payload.data.d.id));
await this.store.redis.set(GenKey(RedisKey.VOICE_KEY, voice.user_id, payload.data.d.id), JSON.stringify(voice));
await this.store.redis.sadd(GenKey(`${RedisKey.VOICE_KEY}${RedisKey.KEYS_SUFFIX}`, payload.data.d.id), GenKey(`${RedisKey.VOICE_KEY}`, voice.user_id, payload.data.d.id));
}
payload.data.d.voice_states = [];
}
Expand Down