How can I make a discord bot stay online even after I close the page?
Follow the steps here to keep it alive.
EDIT: Please make sure your token is secure. Regenerate it, and then use a
.env file to keep it secure. If people get your token, they can, for example, delete all the channels in every server it has access to. (if you don't want to secure your bot, just make sure it doesn't have the permissions to do anything disastrous)