actually it won't work

:( how do i fix it please tell me its very annoying ploblem
This commit is contained in:
ChomeNS 2023-01-24 17:24:03 +07:00
parent 4fa570f951
commit 745d60ea60

8
bot.js
View file

@ -46,13 +46,7 @@ async function createBot (server, config, getBots, setNewBot, dcclient, rl) {
bot._client.removeAllListeners()
}
try {
bot._client = mc.createClient(bot.options)
} catch (e) {
// should i make like if error is only econnrefused and others?
// btw this is to prevent uncaught (which does not reconnect the bot)
bot.end(e.toString(), 'uncaught but actually no') // will display "Disconnected (uncaught but actually no event): error here"
}
bot._client = mc.createClient(bot.options)
bot.setMaxListeners(Infinity)
bot._client.setMaxListeners(Infinity)