Catch error on login

This commit is contained in:
= 2021-07-09 18:06:11 -04:00
parent b6aaff4d70
commit a4d59c0c53
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,12 @@ client.once('ready', () => {
// .catch(err => console.error(err));
});
client.login(process.env.TOKEN);
client.login(process.env.TOKEN)
.then()
.catch(err => {
console.error(err);
console.log('Token: ' + process.env.TOKEN)
};
client.on('message', message => {
// Get the filename and extension as an array