Skip to content

Commit

Permalink
Fix ClassCastException in EntityBuilder#updateMemberCache (#2660)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xirado authored Apr 21, 2024
1 parent fe12aac commit 9318bd9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ public boolean updateMemberCache(MemberImpl member, boolean forceRemove)
GuildVoiceStateImpl voiceState = (GuildVoiceStateImpl) member.getVoiceState();
if (voiceState != null)
{
VoiceChannelImpl connectedChannel = (VoiceChannelImpl) voiceState.getChannel();
if (connectedChannel != null)
connectedChannel.getConnectedMembersMap().remove(member.getIdLong());
AudioChannel connectedChannel = voiceState.getChannel();
if (connectedChannel instanceof AudioChannelMixin)
((AudioChannelMixin<?>) connectedChannel).getConnectedMembersMap().remove(member.getIdLong());
voiceState.setConnectedChannel(null);
}

Expand Down

0 comments on commit 9318bd9

Please sign in to comment.