Open lecanardmarinmarchand opened 1 year ago
Hey,
The problem here is very simple, you're missing the "data.json" file. You I assume didn't download it with the main.py file. It is being used to store your token - so you don't have to put it each time you restard the file - and the channels ID with their webhooks.
So the solution would be to download the 'data.json' file from the "code" section on this project and put it in the same folder as the "main.py" file on your computer. After that it should be fine 👍
If you have any more question let me know!
Hello,
That's a bit weird, I did download it with the json file.
Then it must be that you did launch the file with its full path instead of navigating through your directories So the solution would be to navigate to the folder and launch it from there (Doing the usual "cd [folder]" until you're at it and then "python3 main.py")
if it's not this the problem I don't know what it could be else. by the way, be sure to download discord.py-self and not discord.py, else the token won't work
Seems like I got it worked.
Now I got this instead.
Can you paste exactly what’s on the json file in the project into your json file? And then try again
It’s working great now 👍
You have to get the token of your account and it’s ready to work. Refer to “readme” to see exactly what you have to do (sorry in advance, it’s a mess)
Hello again !
I got it up and running but there's a problem with my token. I did exactly as instructed.
07.07 16:13:39 [Bot] 2023-07-07 17:13:39 [INFO] discord.client logging in using static token
07.07 16:13:39 [Bot] Traceback (most recent call last):
07.07 16:13:39 [Bot] File "/.local/lib/python3.9/site-packages/discord/http.py", line 803, in static_login
07.07 16:13:39 [Bot] data = await self.request(Route('GET', '/users/@me'))
07.07 16:13:39 [Bot] File "/.local/lib/python3.9/site-packages/discord/http.py", line 745, in request
07.07 16:13:39 [Bot] raise HTTPException(response, data)
07.07 16:13:39 [Bot] discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
07.07 16:13:39 [Bot] The above exception was the direct cause of the following exception:
07.07 16:13:39 [Bot] Traceback (most recent call last):
07.07 16:13:39 [Bot] File "/main.py", line 672, in
Ok so it seems like I managed to get it to work but not in the way that I expected.
I made a bot and replaced what's inside of the token field with the bot's token. The problem is that I don't want to use a bot but my Discord account (selfbot).
How to do that ?
You might have discord.py installed, and not discord.py-self
Could you check with pip what you have installed? If you have both of them it won’t work, you absolutely have to only have discord.py-self (On one of your screenshots above, I saw “discord.py” without the self argument so I think this is the problem)
Hello ! I'm trying to run the Discord bot but I keep getting this error. Can you help me ?
07.07 12:18:14 [Bot] Traceback (most recent call last): 07.07 12:18:14 [Bot] File "/./Bot1/main.py", line 218, in
07.07 12:18:14 [Bot] account_token = get_account_token()
07.07 12:18:14 [Bot] File "/./Bot1/main.py", line 60, in get_account_token
07.07 12:18:14 [Bot] with open('data.json', 'r') as f:
07.07 12:18:14 [Bot] FileNotFoundError: [Errno 2] No such file or directory: 'data.json'