I am not very good at all this, my discord bot is mainly frankenstein’d from others work… today I logged in to update one of the commands and the project was converted to nix and now will not work. Seems to be having issues on the first line where it says import discord
import discord
import os
client = discord.Client()
here is the error:
Traceback (most recent call last):
File "main.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
as I said, I am not a developer, so i’m kind of at a loss for how to get it working again…
Have you tried poetry add discord.py in the Shell tab? If that doesn’t work, use pip install -U discord.py instead.
Reason being, after migrating to Nix the discord.py package probably wasn’t installed, which is the reason Python didn’t know what the discord module was.
I was wondering that too, but the docs say to install with pip install -U discord.py.
I also read poetry installing doesn’t even work without additional configuration, but I put it in regardless because it’s usually better to install with poetry if possible on Replit.