diff --git a/src/bot.js b/src/bot.js index 1338d03..4293f89 100644 --- a/src/bot.js +++ b/src/bot.js @@ -27,6 +27,16 @@ const bot = new Eris.Client(config.token, { }, }); +bot.on("error", err => { + if (err.code === 1006) { + // 1006 = "Connection reset by peer" + // Eris allegedly handles this internally, so we can ignore it + return; + } + + throw err; +}); + /** * @type {Eris.Client} */