decayer177 / Discord-Basic-Nuke-Bot

Basic Discord Nuke Bot
https://github.com/decayer177/Discord-Basic-Nuke-Bot
GNU General Public License v3.0
30 stars 27 forks source link

I get error #1

Closed Atharvarb closed 3 years ago

Atharvarb commented 3 years ago

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

decayer177 commented 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!

Atharvarb commented 3 years ago

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 ========  ███╗░░██╗██╗░░░██╗██╗░░██╗███████╗  ██████╗░░█████╗░████████╗ ████╗░██║██║░░░██║██║░██╔╝██╔════╝  ██╔══██╗██╔══██╗╚══██╔══╝ ██╔██╗██║██║░░░██║█████═╝░█████╗░░  ██████╦╝██║░░██║░░░██║░░░ ██║╚████║██║░░░██║██╔═██╗░██╔══╝░░  ██╔══██╗██║░░██║░░░██║░░░ ██║░╚███║╚██████╔╝██║░╚██╗███████╗  ██████╦╝╚█████╔╝░░░██║░░░ ╚═╝░░╚══╝░╚═════╝░╚═╝░░╚═╝╚══════╝  ╚═════╝░░╚════╝░░░░╚═╝░░░ - 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 :(

decayer177 commented 3 years ago

The code supplied doesn't have json supplied. Could you elaborate on the issue by any chance?

Atharvarb commented 3 years ago

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

decayer177 commented 3 years ago

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?

Atharvarb commented 3 years ago

Ok

  1. if I type python in cmd it tells

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.

  1. I typed pip install jsons in cmd while installing it

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

decayer177 commented 3 years ago

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.

Atharvarb commented 3 years ago

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

decayer177 commented 3 years ago

2CF1AB59-66D9-405D-B654-A981455618C7 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.

Atharvarb commented 3 years ago

Yes, I know that, but I keep getting json errors!

Atharvarb commented 3 years ago

So what to do? Please reply

Atharvarb commented 3 years ago

Wait, YAAYYYY! it worked!!! Thank you so much I am closing this issue!!!