Closed Atharvarb closed 3 years ago
Hey mate! Looking at your error, it appears you’ve missed the first step on configuring where you have to enable “server members” intent. In the Discord Developer Portal, go to bot and make sure “server members intent” is enabled. Should fix your issue!
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
========= RESTART: E:\Atharva Bhat\Python\Projects\Nuke\NukeTrial.py.py ======== [31m[1m ███╗░░██╗██╗░░░██╗██╗░░██╗███████╗ ██████╗░░█████╗░████████╗ ████╗░██║██║░░░██║██║░██╔╝██╔════╝ ██╔══██╗██╔══██╗╚══██╔══╝ ██╔██╗██║██║░░░██║█████═╝░█████╗░░ ██████╦╝██║░░██║░░░██║░░░ ██║╚████║██║░░░██║██╔═██╗░██╔══╝░░ ██╔══██╗██║░░██║░░░██║░░░ ██║░╚███║╚██████╔╝██║░╚██╗███████╗ ██████╦╝╚█████╔╝░░░██║░░░ ╚═╝░░╚══╝░╚═════╝░╚═╝░░╚═╝╚══════╝ ╚═════╝░░╚════╝░░░░╚═╝░░░ [32m[1m- USE THIS AT YOUR OWN RISK. Read this for full info: https://github.com/Videro1407/nuke-bot/blob/main/README.md
- Made strictly for educational purposes by @Videro1407: https://linktr.ee/videro
- I won't be responsible for any stupid things which any of you might not / might do. Traceback (most recent call last): File "E:\Atharva Bhat\Python\Projects\Nuke\NukeTrial.py.py", line 30, in
config = json.loads(open('config.json', 'r').read()) File "E:\Atharva Bhat\Python\lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) File "E:\Atharva Bhat\Python\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "E:\Atharva Bhat\Python\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 66)
After giving the permission of that I got this :(
The code supplied doesn't have json supplied. Could you elaborate on the issue by any chance?
Ok so I copy the code in the GitHub module and I pasted it in IDLE python editor
Then I clicked to run the script
it didn't work
same error
I've ran the same exact code, editing nothing except adding the bot token at the bottom and the all commands worked without error. Are you sure you're running Python 3.7?
Ok
C:\Users\user>python Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
is it the error with my python version or some JSON issues?
Again I ran the code after uninstalling and reinstalling python, It just tells Ah shit here we go again According to the code, it should print joining
it doesn't print
I’m failing to understand why you’re getting JSON errors from a code that utilizes absolutely no JSON.
Also, in terms of Python, version 3.7 is what it’s coded on. So, you would need to install the appropriate version, reinstall discord.py, and run the code in a Python 3.7 environment.
As for what it prints, sometimes it doesn’t report joining a server. It’ll say “ah shit here for go again” when starting the code, but typically after that the command prompt will remain dormant until a command is ran.
In the start there is import json So I went to pypi and typed json pypi It told lol install jsons I did that Then after Installing the modules And I run the code I got this error, so I commented, And I even typed Ball after "Ah shit, here we go again" nothing happens, so all during my online class I left python and discord open
At the end of my class nothing happens in the discord or python app
Maybe it's the error with config.json
If you look at the bot.py file associated with this Git, you will notice that I do not import JSON at all and that no dependencies need installed other that discord.py in a python 3.7 environment, mate.
Yes, I know that, but I keep getting json errors!
So what to do? Please reply
Wait, YAAYYYY! it worked!!! Thank you so much I am closing this issue!!!
Traceback (most recent call last): File "e:\Atharva Bhat\Python\Projects\Nuke\NukeTrial.py.py", line 162, in
client.run("ODM0Njc2NjU2MTkwMjU5MjQy.YIEXNg.UPmvoTHZk6fRBqsvfa1rz6-lL1U") File "E:\Atharva Bhat\Python\lib\site-packages\discord\client.py", line 723, in run
return future.result() File "E:\Atharva Bhat\Python\lib\site-packages\discord\client.py", line 702, in runner await self.start(*args, **kwargs) File "E:\Atharva Bhat\Python\lib\site-packages\discord\client.py", line 666, in start await self.connect(reconnect=reconnect) File "E:\Atharva Bhat\Python\lib\site-packages\discord\client.py", line 601, 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 0x000001F0DA6F4280> Traceback (most recent call last): File "E:\Atharva Bhat\Python\lib\asyncio\proactor_events.py", line 116, in del self.close() File "E:\Atharva Bhat\Python\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "E:\Atharva Bhat\Python\lib\asyncio\base_events.py", line 746, in call_soon self._check_closed() File "E:\Atharva Bhat\Python\lib\asyncio\base_events.py", line 510, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed
I get that error