Is there a way to stop my app?


#1

Hey, I am new to glitch and I am using it as a Discord bot. I am trying to figure out how to stop my bot to apply new changes. Thanks


#2

Found out that I could just change a json file for it to restart.

ISSUE RESOLVED


#3

Hey @realSaddy! I use Glitch to host my Discord bot too! It’s pretty helpful as it’s free. One way I would recommend updating your bot’s code is copying the main .js code to a Pastebin or a .txt file in your Glitch project and edit it there. You can also easily create another Discord bot to use as your beta version to make sure everything works before adding it to your main bot. Then when you’re ready to add the new code to your bot, just copy and paste it from the .txt file to your bot’s source code. Then I would recommend adding a /restart command to your bot so you can restart it when necessary.

If you have any questions or need with something else, you can get my Discord here and shoot me a question. Hope this helps :smiley:


#4

I don’t understand how this solved the problem. The question was how do you stop your app?

I have a use case where my telegram bot is seating on glitch and I want to just stop it while I run my bot locally to test some new functionalities and telegram doesn’t allow more than one instance of that bot. So I need to stop glitch from running bot.

I used a temp solution by creating an intentional error in the start script in my package.json by mispelling the name of my start point file from index.js to indx.js, this creates an error and my bot doesn’t run, but I want to know if there is maybe a functionality to stop instead of using this approach.