Discord bot won't connect

My discord bot won’t connect unless I go to the terminal and type “node .”
But then if I close the terminal / website then the bot will disconnect. How can I fix this.

I am pretty sure you need to rent a small server if you want to do this or upgrade your project so it never sleeps

Or use uptimerobot.com

No, you have to specify it in package.json to start automatically


sorry im quite new to this, how would I go about doing that?