Bot disconnects for no reason and reconnects
I am using discord.js v11.60
Image of Logs
Running a very basic message monitoring script, happens on all my discord bot applications after a while of being running the program.
//Inital Login
client.on("ready", () => {
sendToLogs(`Logged in as ${client.user.tag}!`)
})
client.on('error', err => {
sendToLogs("Error")
console.error(err)
process.exit(1);
});
client.on('reconnecting', message => {
sendToLogs(`User Reconnecting`)
});
client.on('resume', message => {
sendToLogs(`Connected ${client.user.tag}`)
});
client.on('disconnect', message => {
sendToLogs(`User Disconnected`)
process.exit(1);
});
//On every message
client.on("message", msg => {
console.log(message.content)
});
client.login(token)
Self botting is against TOS, so discord.js stopped supporting it..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With