Skip to content

Commit

Permalink
ora spinner added, better readme written
Browse files Browse the repository at this point in the history
  • Loading branch information
Briuor committed Feb 16, 2020
1 parent a2b3a8f commit ccef23b
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 48 deletions.
73 changes: 71 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
# wbm (Project not finished)
wbm is an API to send bulk message in whatsapp.

# wbm
> wbm is an API to send bulk messages in whatsapp.
<p align="center">
<img src="https://github.com/Briuor/wbm/tree/master/assets/demo.gif">
</p>

## Installation
```bash
> npm install wbm
```

## Usage
:tw-26a0: **At the beginning it will display a QR Code on terminal, just scan it using whatsapp app.**

### Send same message to every contact

```javascript
const wbm = require('wbm');

wbm.start().then(async () => {
const phones = ['5535988841854']; // phone numbers ['5535988841854', ...]
const message = "good morning";
await wbm.send(phones, message);
})

```
### Send custom message to every contact

```javascript
const wbm = require('wbm');

wbm.start().then(async () => {
const contacts = [{ phone: '5535988841854', name: 'Bruno' }];
for (contact of contacts) {
let message = 'good morning ' + contact.name;
await wbm.sendTo(contact.phone, message);
}
})
```

## API

### send(phones, message)

Send same message to every phone number.

##### phones
Array of phone numbers: ['5535988841854', ...]
Type: `array`

##### message
Message to send to every phone number
Type: `string`

### sendTo(phone, message)

Send message to a phone number.

##### phone
Phone number: '5535988841854'.
Type: `string`


##### message
Message to send to phone number.
Type: `string`

## License

[MIT](https://choosealicense.com/licenses/mit/)
Binary file added assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
220 changes: 200 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ccef23b

Please sign in to comment.