Refreshing, so files get updated


So I know that it doesnt show the change of the file. But It seems to doesnt work for my bot too. Only when I refresh he uses the new data. Can I use a refresh command in my Node script?


You can use the refresh command in console of your project to manually refresh
I also use it to refresh after adding new / editing files.


I know that command, so iam asking to use it in Node or make it auto, due Iam not 24/7 at my pc to refresh whenever a discord user has changed the settings


If you mean restart the bot, then you can use
it will instantly restart / refresh.


The filesystem is writable, any changes you make to files are saved and available straight away. You only need to refresh to sync the latest updates in the editor. If you’re not seeing this behaviour, let us know the project name and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.


Hey, Iam not a pro in js, but when I host my bot on my computer, it all wors like I want. but If i host on glitch, the canges dont take place, only after a restart. Also how can I dm?


“How can I dm” is not related to Glitch, and therefore we can’t provide help about it; you may want to check the according documentation to your bot’s library :

and about restarting, if you want it to be automatic, you can use the following code under the ready event of your bot :
setTimeout(function () { process.exit(); }, 900000)
where the 900000 is 15 minutes in milliseconds.


You can click on my name on this forum to DM me, but if you don’t see the option because you’re a new user then feel free to email it to us instead:

MOD EDIT: update email to send to the Support as a whole


This will refresh your glitch project every 6 hours:

var h = 6;
const resetter = setTimeout(() => {
    console.log(`Restarting Glitch project...`);
}, h * (60000 * 60));

MOD EDIT: formatting