How can i create command for reload console // Discord Bot


Like this command

  "install": {
    "include": [
  "restart": {
    "exclude": [
    "include": [
  "throttle": 900000

In watch.json
But i dont want when i change something in my program then reload console
I just want to reload console without change something in my program
Plzz help me :slight_smile:

MOD EDIT: formatting

1 Like


Hello @Sivonja8,

Do you mean run a console command from your discord bot command that would restart the project from the projects console.
If that is the case, then you can TRY the following:

function execute(command) {
  const exec = require('child_process').exec

  exec(command, (err, stdout, stderr) => {

execute( "Code to execute")


I want it to be re-loaded automatically with the timer

1 Like


You could use a setTimout function to have it run every certain amount of time!

More info given on discord –

(Javascript solution for others who cannot see discord messages):

setTimeout(restartTimer, 1.8e+6)

function restartTimer() {