Just so you know, you have one file named index.js and the other index .js (with the space). Make sure you are adding your changes to the index.js file (without a space) because that is the one that Replit runs by default.
Also, you need to update the following from line 15:
you can still use process.env.<SECRET_KEY>, but I prefer to have a secret with key DISCORD_TOKEN which means that I do just client.login(); with no arguments.
Your error would be that you haven’t closed the app.listen callback properly. In future please paste in the relevant errors in a code block. But I would recommend going without express, since the webserver is just for keep-alive and you could replace it (lines 2-7) with
I ended up coding in the similar way before seeing all this on visual studio code, bot is ready but now it keeps going offline, gonna try and add that code here too