Hello,
I noticed that when disabling cache, on dispatch of a VOICE_STATE_UPDATE event, oceanic will systematically throw a UncachedError (UncachedError: Member#guild is not present.)
I looked through the source code and found that in order to get the oldState, member.voiceState() is called, and this method itself calls member.guild (and it throws the error)
So I proposed to instead directly call guild?.voiceStates.get(member.id)? so that if guild is not cached, oldState will simply default to null and avoid throwing error
Hello, I noticed that when disabling cache, on dispatch of a VOICE_STATE_UPDATE event, oceanic will systematically throw a UncachedError (UncachedError: Member#guild is not present.)
I looked through the source code and found that in order to get the
oldState
,member.voiceState()
is called, and this method itself calls member.guild (and it throws the error)So I proposed to instead directly call
guild?.voiceStates.get(member.id)?
so that if guild is not cached, oldState will simply default tonull
and avoid throwing error