erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.65k stars 271 forks source link

PrivilegedIntentsRequired #212

Open fret423 opened 11 months ago

fret423 commented 11 months ago

the code that reproduces this issue or a replay of the bug

I have followed the instructions to get the USER_TOKEN, BOT_TOKEN, ServerID and Channel_ID (note, I've saved the ServerID in the GUILD_ID variable as there was none for server ID. I don't know what to put in the callback_url, so I've put a default of http://discord.com)

I have granted all OAUTH permissions to the bot as per the instructions as well.

Also note, I've put quote marks around the variables. I'm unsure if this is correct

I have saved them in the .env file and installed the requirements.txt as well When I run this: python .\task_bot.py, I get the error below

Describe the bug

Describe the bug

task_bot crashes

error log

2023-08-09 14:00:59 INFO discord.client logging in using static token Traceback (most recent call last): File ".\task_bot.py", line 13, in bot.run(BOT_TOKEN) File "C:\Users\Admin\anaconda3\lib\site-packages\discord\client.py", line 860, in run asyncio.run(runner()) File "C:\Users\Admin\anaconda3\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Admin\anaconda3\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "C:\Users\Admin\anaconda3\lib\site-packages\discord\client.py", line 849, in runner await self.start(token, reconnect=reconnect) File "C:\Users\Admin\anaconda3\lib\site-packages\discord\client.py", line 778, in start await self.connect(reconnect=reconnect) File "C:\Users\Admin\anaconda3\lib\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 0x000001BDA9B81DC0> Traceback (most recent call last): File "C:\Users\Admin\anaconda3\lib\asyncio\proactor_events.py", line 116, in del self.close() File "C:\Users\Admin\anaconda3\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Users\Admin\anaconda3\lib\asyncio\base_events.py", line 719, in call_soon self._check_closed() File "C:\Users\Admin\anaconda3\lib\asyncio\base_events.py", line 508, in _check_closed raise RuntimeError('Event loop is closed')