Fixing member count in vc not updating on status

This commit is contained in:
2024-09-12 13:09:22 +02:00
parent 06d6d8dca8
commit 0c2558d5d0

View File

@@ -0,0 +1,18 @@
import { VoiceState } from "discord.js"
import { IEvent } from "interfaces"
export default {
name: "updatecache",
description: "Updates the voice states cache",
event: "voiceStateUpdate",
async execute(_o: VoiceState, n: VoiceState) {
const guild = n.guild
if (!guild) return
if (!n.channel) {
guild.voiceStates.cache.delete(n.id)
}
}
} as IEvent