Restarting project without "failed to start application on discreet-quokka.glitch.me"

I am working on a customizable Discord bot and I want to allow the user to reload the project with a button press. I have the project reloading, but of course, when it reloads it brings up the “failed to start application on discreet-quokka.glitch.me” screen. I want to make a user-friendly way to let them know the bot is restarting and then possibly redirect them back to the main project page after a few seconds or so. I figured there could be one of two options:

  1. While the bot is restarting, direct them to another page in my project that never restarts, which will then redirect them back after 5 seconds or so. I’m not really sure how to do this, however. I figure in watch.json I would have to exclude that html file and then call it before I restart the project. I don’t know how to set correct paths in watch.json though.

  2. When they hit restart, close the window, then restart the project. The problem is if I do either of those before the other, I can’t to the other if that makes any sense. I can close the window but not reload the project because the window is closed, or vice versa.

Any suggestings? Project link: https://glitch.com/edit/#!/discreet-quokka