Zero6992/chatGPT-discord-bot

RuntimeError: Event loop is closed

aryannov25 opened this issue · 1 comments

C:\Users\aryan\Downloads\chatGPT-discord-bot>python main.py
2024-01-21 01:55:23 INFO discord.client logging in using static token
Traceback (most recent call last):
File "C:\Users\aryan\Downloads\chatGPT-discord-bot\main.py", line 31, in
bot.run_discord_bot()
File "C:\Users\aryan\Downloads\chatGPT-discord-bot\src\bot.py", line 317, in run_discord_bot
client.run(TOKEN)
File "C:\Users\aryan\AppData\Roaming\Python\Python310\site-packages\discord\client.py", line 860, in run
asyncio.run(runner())
File "C:\Program Files\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Users\aryan\AppData\Roaming\Python\Python310\site-packages\discord\client.py", line 849, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\aryan\AppData\Roaming\Python\Python310\site-packages\discord\client.py", line 778, in start
await self.connect(reconnect=reconnect)
File "C:\Users\aryan\AppData\Roaming\Python\Python310\site-packages\discord\client.py", line 704, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000025695CEF0A0>
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Program Files\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 745, in call_soon
self._check_closed()
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Using Python 3.10

Updated