voicestate is undefined

client.on('voiceStateUpdate', (oldState, newState) => {
    voiceClient.startListener(oldState, newState);
    console.log(voiceClient.getUserData(client.guilds.cache.get(guildID).members.cache.get(newState.id)))
})


Inside of the console.log() I am trying to log the user data of the state's user, but as I try and do that, I get an error saying Can't read properties of undefined reading 'id', yet, When I try and log the voiceState it logs fine.
Am I doing something wrong here?
Was this page helpful?