Skip to content

Commit b903d54

Browse files
authored
fix: Handle null reference when Voice State is still in cache, but the channel it belongs to has been expired (#1648)
Fixes #1644
1 parent 3ffe90d commit b903d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/client/smart_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ async def place_voice_state_data(
794794

795795
if old_state := self.get_voice_state(user_id):
796796
# noinspection PyProtectedMember
797-
if user_id in old_state.channel._voice_member_ids:
797+
if old_state.channel is not None and user_id in old_state.channel._voice_member_ids:
798798
# noinspection PyProtectedMember
799799
old_state.channel._voice_member_ids.remove(user_id)
800800

0 commit comments

Comments
 (0)