voicechannel.members result in a error ('NoneType' object has no attribute 'id')
See original GitHub issueSummary
Due to a new update on discord (stage channels) getting members from a voice channel results in a error.
Reproduction Steps
I enabled community on my guild and then made a stage channel after that I joined a normal voice channel and when I tried to grab the members of a voice channel I would always get a error
Minimal Reproducible Code
Aivo.get_channel(channelid).members
Expected Results
Returns all the members in a normal voice channel
Actual Results
It errors out
Screenshot: https://cdn.discordapp.com/attachments/821520339242057749/826935480531943424/Discord_tE2MBXrLAD.png
Error:
Ignoring exception in on_voice_state_update Traceback (most recent call last): File “/usr/local/lib/python3.8/dist-packages/discord/client.py”, line 343, in _run_event await coro(*args, **kwargs) File “/root/Azure/Azure.py”, line 137, in on_voice_state_update await if_channel_empty_delete(member, before, after) File “/root/Azure/Azure.py”, line 118, in if_channel_empty_delete check = checkch.members File “/usr/local/lib/python3.8/dist-packages/discord/channel.py”, line 630, in members if state.channel.id == self.id: AttributeError: ‘NoneType’ object has no attribute ‘id’
Intents
All intents enabled
System Information
- Python v3.8.5-final
- discord.py v1.6.0-final
- aiohttp v3.7.4.post0
- system info: Linux 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021
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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Fixed by #6608
I just accidentally pressed close the close button since I was replying from my phone.