Add eslint config and fix linting issues

This commit is contained in:
Pedro Lopez
2020-02-02 14:50:04 -04:00
parent 8eb461ed32
commit cc477f9545
11 changed files with 1047 additions and 124 deletions

View File

@@ -1,4 +1,4 @@
const { Client } = require('./index')
const { Client } = require('./index');
const client = new Client({puppeteer: {headless: false}});
// You can use an existing session and avoid scanning a QR code by adding a "session" object to the client options.
@@ -18,7 +18,7 @@ client.on('authenticated', (session) => {
client.on('auth_failure', msg => {
// Fired if session restore was unsuccessfull
console.error('AUTHENTICATION FAILURE', msg);
})
});
client.on('ready', () => {
console.log('READY');
@@ -125,9 +125,9 @@ client.on('message_create', (msg) => {
if(msg.fromMe) {
// do stuff here
}
})
});
client.on('disconnected', () => {
console.log('Client was logged out');
})
});