mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Initial simple client implementation
This commit is contained in:
19
example.js
Normal file
19
example.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const { Client } = require('./src')
|
||||
|
||||
const client = new Client();
|
||||
|
||||
client.initialize();
|
||||
|
||||
client.on('qr', (qr) => {
|
||||
console.log('QR RECEIVED', qr);
|
||||
});
|
||||
|
||||
client.on('authenticated', () => {
|
||||
console.log('AUTHENTICATED');
|
||||
});
|
||||
|
||||
client.on('ready', () => {
|
||||
console.log('READY');
|
||||
client.destroy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user