Trying to run a bot i made in Python but when I run it, it can't get past the first two lines?
Code:
Traceback (most recent call last):
File "discord.py", line 1, in <module>
import discord
File "C:\Users\Evan\Desktop\bots\discord.py", line 2, in <module>
from discord.ext import commands
ModuleNotFoundError: No module named 'discord.ext'; 'discord' is not a package
Rename your file to something else besides discord.py.
For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.
folder named discord
Where would I put that? I only have a python script, no other extensions
I hadn't seen that your file itself was named discord.py before I replied.
As I clarified in my edit a few min. later, rename your script to something else besides discord.
So I changed the name, and now it's only throwing an error because theres no module called discord. I think that was a step in the right direction, though
Make sure you're using the same Python version to run the script that you installed discord.py for.
For further help, you should join either the official discord.py server or the Discord API server.
Im using python 3.7, what version of discord.py should I be using? I just assumed I should install the latest one right?
If you have other versions of Python installed, make sure you installed discord.py on 3.7 and that you're using 3.7 to run the script.
The async branch of discord.py doesn't support Python 3.7, so you need to use the rewrite branch with websockets 6.0.
Most helpful comment
I hadn't seen that your file itself was named
discord.pybefore I replied.As I clarified in my edit a few min. later, rename your script to something else besides
discord.