Skip to content

[BUG] Occasionally VoiceChannel is None  #1644

Closed
@DeJayDev

Description

@DeJayDev

Library Version

5.11.0

Describe the Bug

Occasionally, the built in cache receives None for VoiceChannel when trying to access _voice_member_ids. I believe this has to do with not having the VOICE_STATE_UPDATE intent.

Steps to Reproduce

Run an interactions.py bot with Sentry enabled and inspect the error log occasionally.

Expected Results

Ideally, the library isn't sending errors to Sentry :)

Minimal Reproducible Code

No response

Traceback

AttributeError: 'NoneType' object has no attribute '_voice_member_ids'
  File "interactions/client/smart_cache.py", line 767, in place_voice_state_data
    if user_id in old_state.channel._voice_member_ids:

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions