Skip to content

Commit

Permalink
Bundle ready
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcardeenas committed Jan 23, 2020
1 parent 75b3078 commit 062ba21
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
import { Whatsapp } from './api/whatsapp';
import { create } from './controllers/initializer';

// export { Chat, Contact, Message } from './api/model';
// export { Whatsapp } from './api/whatsapp';
// export { create } from './controllers/initializer';

create().then(client => start(client));

async function start(client: Whatsapp) {
client.onMessage(message => {
console.log(message);
if (message.body === 'Hi') {
client.sendText(message.from, '👋 Hello from sulla!');
}
});
}
export { Chat, Contact, Message } from './api/model';
export { Whatsapp } from './api/whatsapp';
export { create } from './controllers/initializer';

0 comments on commit 062ba21

Please sign in to comment.