Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcardeenas committed Jun 10, 2019
1 parent 3df4434 commit 89c2d62
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# πŸ€– sulla

Javascript whatsapp framework (web whatsapp driver)

## Instalation

```bash
> npm i sulla
```

## Usage

```javascript
import { init } from 'sulla';
import { create } from 'sulla';

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

function start(client) {
client.onMessage().subscribe(message => {
if (message.body === 'Hi') {
client.sendText(message.from, 'πŸ‘‹ Hello from sulla!');
}
create().then(client => {
client.onMessage(message => {
if (message.body === 'Hi') {
client.sendText(message.from, 'πŸ‘‹ Hello from sulla!');
}
});
});
}

```

0 comments on commit 89c2d62

Please sign in to comment.