You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
451 B
JavaScript
14 lines
451 B
JavaScript
const { createWhatsApp } = require('./core/baileys');
|
|
|
|
const waEmitter = require('./core/emitter');
|
|
const go = async () => {
|
|
const whatsApp = await createWhatsApp('8618777396951');
|
|
whatsApp.start();
|
|
|
|
setTimeout(() => {
|
|
console.log('sending message...');
|
|
waEmitter.emit('request.8618777396951.send.message', { to: '8613317835586', externalId: new Date().getTime(), text: 'Hello World: ' + new Date().toUTCString() });
|
|
}, 5000);
|
|
}
|
|
|
|
go(); |