So once upon a today, I went to edit my discord bot project known as dogetron-discordbot. I added some stuff then refreshed the bot. It stopped working. I’m refreshing and refreshing, but it doesn’t work. There are no error messages, just loading. The output looks similar to this:
Your app is listening on port 1988.
Attempting to load command kick. <== (That’s my discord bot command handler)
Hey @cybertelx, it looks to me like you’re overriding your project’s port. You should just use process.env.PORT and remove any overrides you have to make sure you’re always connecting to the port that Glitch is currently listening for. That in itself might enable your bot to connect; while your project’s not listening to the correct port Glitch will continually try to restart your application.
There are some errors further up in your logs, but I don’t see anything further indicating that your command isn’t loaded.
Just to be clear here, you shouldn’t need to override your project’s PORT in .env at all. Glitch will set that environment variable to the one that’s expected on its own unless it’s overriden. There are a few situations where 3000 isn’t the correct port, and overriding it in .env will mean that your project won’t respond if you do get into one of those conditions (the most common one is when the Debugger is active).
Hi, please create your own topic with relevant info like project name. We can’t help you with that minimal description, and please please please don’t bump old topics unless they’re directly related to your problem i.e. exact same errors, exact same project etc. Thanks!