- Python v3.8.5-final
- discord.py v1.8.1-final
- aiohttp v3.6.2
- system info: Windows 10 10.0.19041
Checklist
Let's make sure this issue is valid!
[x] I am using the latest released version of the library.
[X] I am using a user token.
[X] I have shown the entire traceback and exception information.
[X] I've removed my token from any code.
Exception
websocket connection is closing.
Traceback (most recent call last):
File "genessir.py", line 190, in <module>
runSelfbot()
File "bot.py", line 188, in runSelfbot
bot.run("mytoken")
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 755, in run
return future.result()
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 734, in runner
await self.start(*args, **kwargs)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 698, in start
await self.connect(reconnect=reconnect)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 599, in connect
await self.ws.poll_event()
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 555, in poll_event
await self.received_message(msg.data)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 505, in received_message
func(data)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 481, in parse_ready
self._add_guild_from_data(guild_data)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 377, in _add_guild_from_data
guild = Guild(data=guild, state=self)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 190, in __init__
self._from_data(data)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 326, in _from_data
self._fetch_members(guild)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 353, in _fetch_members
channel = self.channels[0]
IndexError: list index out of range
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x03EBCA00>
Traceback (most recent call last):
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 719, in call_soon
self._check_closed()
File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Summary
The bot cant start if a guild has 0 channels
Reproduction Steps
How did you make it happen?
Code
Relevant code that shows the bug.
Expected Results
Normally run
Actual Results
What is currently happening?
The bot cant run
System Info
Checklist
Let's make sure this issue is valid!
Exception