Discord Bot Glitching

When the bot comes on. It keeps on going offline then online. It’s frustrating and annoying when it is essential

Have you setup a watch.json file to keep it from constantly restarting when you edit?

i was never edting anything, and no

maybe try that and see if it changes anything
https://glitch.com/help/restart/

2 Likes

ill check it out. Thanks.

ill just ask but i see this problem every time a user joins the server…

  "install": {
    "include": [
      "^package\\.json$",
      "^\\.env$"
    ]
  },
  "restart": {
    "exclude": [
      "^public/",
      "^dist/"
    ],
    "include": [
      "\\.js$",
      "\\.coffee$",
      "\\.json"
    ]
  },
  "throttle": 100
}

I tried to use that. But did’t work

try changing the ‘throttle’ to a higher time (its in milliseconds)

can you come to my project? http://glitch.com/~unknown-discord-bot

sure. i requested to join

done! Thanks for the help!

ah i see. you need some sort of web server running, because that’s what glitch looks for to know when the process has completely started. i added this code to the top of your main file:

const express = require('express');
const app = express();
app.use(express.static('public'));
app.get("/", (request, response) => {
  console.log(Date.now() + " Ping Received");
  response.sendStatus(200)
});
app.listen(process.env.PORT);

okay! Thanks for the help!

1 Like

its still a bit glitchey when a user joined…

what do you mean by glitchy?

it goes offline and online when a user joins

could it be that something with canvas is making it crash?

I see you there RiversideRocks :eyes:

I have no idea… Its canvas-constructer

he he I took a peak at the project. Look good. >1000 lines of Node not too shabby.

i think i see more then that…