I've tried everything I know to do but every time I add "import discord" it says "Import "discord" could not be resolved". I've tried python3 -m pip install discord, pip install discord, and pip install discord.py.
CodePudding user response:
Python 3.8 or higher is required
To install the library without full voice support, you can just run the following command:
# Linux/macOS
python3 -m pip install -U discord.py
# Windows
py -3 -m pip install -U discord.py
Otherwise to get voice support you should run the following command:
# Linux/macOS
python3 -m pip install -U "discord.py[voice]"
# Windows
py -3 -m pip install -U discord.py[voice]
To install the development version, do the following:
$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]