jh220de / ccbot

A nice and shiny discord message purger.
https://jh220.de/projects/ccbot
GNU Affero General Public License v3.0
4 stars 1 forks source link

[Major Exploit] Bot keeps crashing and goes offline #10

Closed nsde closed 2 years ago

nsde commented 2 years ago

Describe the bug The bot always stops working and goes offline after some specific error.

To Reproduce The actual origin causing this issues is yet to be found.

Expected behavior No crash.

Screenshots Not needed.

Additional context

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at new NodeError (node:internal/errors:371:5)
    at process.target.send (node:internal/child_process:721:16)
    at /home/discord/clearchat/node_modules/discord.js/src/sharding/ShardClientUtil.js:88:17
    at new Promise (<anonymous>)
    at ShardClientUtil.send (/home/discord/clearchat/node_modules/discord.js/src/sharding/ShardClientUtil.js:86:12)
    at /home/discord/clearchat/node_modules/discord.js/src/sharding/ShardClientUtil.js:122:12
    at new Promise (<anonymous>)
    at ShardClientUtil.fetchClientValues (/home/discord/clearchat/node_modules/discord.js/src/sharding/ShardClientUtil.js:111:12)
    at Timeout.setActivity [as _onTimeout] (/home/discord/clearchat/src/bot.js:39:22)
    at listOnTimeout (node:internal/timers:557:17) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}
nsde commented 2 years ago
#!/bin/sh
while :
do
  node index.js
  sleep 5
  echo "RESTART Because of a crash "
done
nsde commented 2 years ago

or nodemon

nsde commented 2 years ago

or nodemon

preferred way

nodemon -x 'node index.js || touch index.js'

@JH220

nsde commented 2 years ago

image