Question: Hi, I am just trying to do what the title is asking. I have a discord.py bot running in one file but its a node.js file to run the backend websocket and frontend website. The npm start that gets run on .replit attempts to run the wss.js and main.py file. I get the error /bin/sh: 1: python: not found
understandably because its a node.js project. I looked for a bit but couldn’t really find how I could add the python to the project. Thanks.
Repl link/Link to where the bug appears: https://replit.com/@saturnwillow/WebConnectWithDPY
1 Like
Hey @saturnwillow, welcome to the community!
Do they have to be in the same Repl? Can’t you move the Python script into its own?
1 Like
As @QwertyQwerty88, it would be better to keep your Repl in one language, but if you really need Python and JS, you can use this template by @LuisAFK:
https://replit.com/@luisafk/Node-Python
2 Likes
It would complicate things as I would probably have to use http-requests to send the information instead of a local file system. Not really sure how to do that but I could look it up. If you think of a better way to replace the system to communicate between the discord.py bot and python file to the backend ws do let me know.
3 Likes
Just create a separate Python repl, run the backend on it, then modify the web socket url.
3 Likes
backend is a nodejs wss. I need a way to send from a python project discord.py bot to a nodejs wss
3 Likes