I am trying to create a simple discord bot. I have tried importing it via the packages window, which gives the error "Repl.it: Package operation failed" and no other message. Adding it through requirements.txt does nothing. What else can I do?
@Zexogon nope, same error message:
Traceback (most recent call last):
File "main.py", line 3, in
import discord
ModuleNotFoundError: No module named 'discord
It's a problem with installing the package, I think, not the imports I'm using, so I don't understand why adding an import would help.
"Repl.it: Package operation failed" on installing discord.py
I am trying to create a simple discord bot. I have tried importing it via the packages window, which gives the error "Repl.it: Package operation failed" and no other message. Adding it through requirements.txt does nothing. What else can I do?
you need to install this as well:
from discord.ext import commands, tasks
and in requirements.txt add discord.py
from discord.ext import commands, tasks
mabey try making a new repl and copy pasting your code to see if it works
Traceback (most recent call last):
File "main.py", line 3, in
import discord
ModuleNotFoundError: No module named 'discord
It's a problem with installing the package, I think, not the imports I'm using, so I don't understand why adding an import would help.