Culf-B / placeBot

r/place inspired discord bot
GNU General Public License v3.0
0 stars 0 forks source link

Internet connection loss makes bot crash #8

Open Culf-B opened 9 months ago

Culf-B commented 9 months ago

Error can't be catched and can only really be fixed if discord.js makes some sort of fix or connection disconnect event. It should only happen when a messages is updated. Error gives following output

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: getaddrinfo ENOTFOUND discord.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'discord.com'
}

Possible solutions:

Culf-B commented 9 months ago

Should at least prevent data loss (solution 1) before release

Culf-B commented 9 months ago

989c612e55edde15b667834d6808a184116ff42b and 403dd880e8719aedd8ac3ccedc93804eab7f51d2 should prevent data loss

Culf-B commented 6 months ago

Well issue was fixed when some error handling was improved

Now the problem is just, that all messages are deleted from the bot when it losses connection because it doesn't know the difference between missing permissions to see the channel and connection issues, so that needs to be fixed...