Error handling attempt, on lost connection

master
Cristiano Pires 2 years ago
parent cdf7721fed
commit f6da7657f7

@ -54,7 +54,10 @@ const bot = new Client({ intents: [
Partials.Message
]
});
bot.login(process.env.discord_token);
function login()
{
bot.login(process.env.discord_token).catch(()=>{login()});
}
function connectToDB()
{

Loading…
Cancel
Save