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.
16 lines
587 B
JavaScript
16 lines
587 B
JavaScript
const { createWhatsApp } = require('./core/baileys');
|
|
|
|
const waEmitter = require('./core/emitter');
|
|
const go = async () => {
|
|
waEmitter.on('connection:open', event => {
|
|
console.log('connection-open: ', event);
|
|
// waEmitter.emit('request.8618777396951.send.message', { to: '120363389309889162@g.us', externalId: new Date().getTime(), text: '可以发群消息了: ' + new Date().toUTCString() });
|
|
});
|
|
waEmitter.on('creds:update', event => {
|
|
console.log('creds-update: ', event);
|
|
});
|
|
const whatsApp = await createWhatsApp('8618777396951');
|
|
whatsApp.start();
|
|
}
|
|
|
|
go(); |