Hosting error
i am hosting my discord bot written in python using nextcord library and when i deploy it then it shows no module found 'nextcord'
45 Replies
Project ID:
ddaf72cb-61dd-4983-badb-883624f55b44
ddaf72cb-61dd-4983-badb-883624f55b44
not a python expert, but seems like a dependecy error
is the package inside your requirements.txt file?
there is no requirements.txt file
there is only one main.py file
You need a
requirements.txt
file with your bots dependencies in ityou need to add one with all the packages you wanna use
so that railway's container can install em
for example for nextcord you put
nextcord==2.5.0
or whatever version you use on each line list a different onebut in my previous bot written in js nothing happens
js is different
and in my this project when i use
pip install discord.py
in build command then it shows command not found
it auto adds the package-lock.json file
just do what we told you, you have to do it
look at what packages you use, and put em in the file
especifying the version
just discord.py pakage
also, may i ask why you moved to python from js?
this implies you at least use nexcord
more easy and useful
i now chnged to discord.py
coz i think it will work
@jonbeau python is not good :(
and now have i to make requirements.txt file?
yah
in my github repo
can you share the repo?
I'm only just really learning js, I couldn't make a bot with it
it is private
fair
just make sure you do have the file
in the root directory
what is have to add in that file
funnily enough my 1st contact with js was making a bot
all the packages that you use
and their versions
like nexcord
one package per line
with syntax
packagename==versionnumer
i removed it
GitHub
Discord-gpt4-bot-template/requirements.txt at main · jonbeau/Discor...
Contribute to jonbeau/Discord-gpt4-bot-template development by creating an account on GitHub.
i am using discord.py now
then just discord.py
in the requirements file
That one I used pycord but it's a good example
oh
Easy to make
i see that for python ppl use more than the official api...
It's not a common thing? These bot libraries are just wrappers for the official discord API afaik
still failed
[stage-0 6/8] RUN --mount=type=cache,id=s/325b29b6-f107-4482-ad53-94626006dcc5-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:6.168 ERROR: Could not find a version that satisfies the requirement discord.py>=2.5.0 (from versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.16.7, 0.16.8, 0.16.9, 0.16.10, 0.16.11, 0.16.12, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4.0, 1.4.1, 1.4.2, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.2.0, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2) 6.168 ERROR: No matching distribution found for discord.py>=2.5.0 6.407 WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available. 6.407 You should consider upgrading via the '/opt/venv/bin/python -m pip install --upgrade pip' comma @lacrak27
discord.py has no version higher than 2.3.2
it literally tells you
use a lower version
but in my code i print it
@lacrak27
try going for 2.3.2 regardless
it seems to be latest available
change it in the requirements.txt file
and google latest version is showing 2.0
ok
@lacrak27 Damn
working
AHHHH
Thanks alot
no worries
🥰
:)
you can close now
i can't close it, im not a mod