mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Add eslint config and fix linting issues
This commit is contained in:
@@ -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');
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user