Skip to content

Commit

Permalink
Merge branch 'master' into patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
gekkedev authored Jul 19, 2024
2 parents 8dafa45 + 91b2c40 commit 94f635e
Show file tree
Hide file tree
Showing 28 changed files with 2,241 additions and 2,592 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 18.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 18.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: git fetch --tags -f || true

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 18.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: git fetch --tags -f || true

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
continue-on-error: true

- name: Deploy API-Docs
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 18.x

Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ src
tokens
tsconfig.json
typedoc.json
Update.md
UPDATES.md
examples
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## <small>1.32.4 (2024-07-16)</small>

- fix(deps): update dependency @wppconnect/wa-js to ^3.6.0 (#2275) ([4d56011](https://github.com/wppconnect-team/wppconnect/commit/4d56011)), closes [#2275](https://github.com/wppconnect-team/wppconnect/issues/2275)

## <small>1.32.3 (2024-06-24)</small>

- chore: upgrade @wppconnect/wa-js ([50775a8](https://github.com/wppconnect-team/wppconnect/commit/50775a8))

## <small>1.32.2 (2024-06-18)</small>

- chore: Remove unused deps ([a600ce0](https://github.com/wppconnect-team/wppconnect/commit/a600ce0))

## <small>1.32.1 (2024-06-17)</small>

- fix: Fixed emitting events ([95e934d](https://github.com/wppconnect-team/wppconnect/commit/95e934d))
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ Building WPPConnect is really simple, to build the entire project just run
> npm run build
```

# Update checking

Whatsapp is in constant change. In order to tackle this issue, we suggest always keeping your Wppconnect package up-to-date.

The method/function names won't change, only their core algorithm. This way you won't have to makes changes in your code at every update.
They will remain the same forever but might experience deprecation.

## Maintainers

Maintainers are needed, I cannot keep with all the updates by myself. If you are
Expand Down
5 changes: 0 additions & 5 deletions Update.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/getting-started/configuring-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const files = new winston.transports.File({ filename: 'combined.log' });
wppconnect.defaultLogger.add(files); // Add file transport

//Optional: create a custom console with error level
const console = new winston.transports.Console({ level: 'erro' });
const console = new winston.transports.Console({ level: 'error' });
wppconnect.defaultLogger.add(console); // Add console transport

//Optional: Remove the custom transport
Expand Down
4 changes: 4 additions & 0 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The first thing that you had to do is install the `npm package`:
```bash
npm i --save @wppconnect-team/wppconnect
```
or with Yarn:
```bash
yarn add @wppconnect-team/wppconnect
```

or for [Nightly releases](https://github.com/wppconnect-team/wppconnect/releases/tag/nightly):

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/receiving-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function start(client) {
client
.sendText(message.from, 'Hello, how I may help you?')
.then((result) => {
console.log('Result: ', result); //return object success
console.log('Result: ', result); //return success object
})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
.catch((error) => {
console.error('Error when sending: ', error); //return error object
});
}
});
Expand Down
10 changes: 5 additions & 5 deletions examples/basic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ const wppconnect = require('../../dist');
wppconnect
.create()
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
.catch((error) => {
console.log(error);
});

function start(client) {
client.onMessage((message) => {
if (message.body === 'Hi' && message.isGroupMsg === false) {
client
.sendText(message.from, 'Welcome Wppconnect')
.sendText(message.from, 'Welcome to Wppconnect')
.then((result) => {})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
.catch((error) => {
console.error('Error when sending: ', error); //return error object
});
}
});
Expand Down
20 changes: 10 additions & 10 deletions examples/bot-functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const wppconnect = require('../../dist');

wppconnect
.create({
session: 'teste',
session: 'test',
onLoadingScreen: (percent, message) => {
console.log('LOADING_SCREEN', percent, message);
},
Expand Down Expand Up @@ -84,30 +84,30 @@ function start(client) {
await client.setChatState(msg.from, '2');
}
} else if (msg.body.startsWith('!btn')) {
await client.sendMessageOptions(msg.from, 'teste', {
title: 'CALÇA JEN FEMININA',
footer: 'Escolha uma opção abaixo',
await client.sendMessageOptions(msg.from, 'test', {
title: "WOMEN'S JEANS PANTS",
footer: 'Choose an option below',
isDynamicReplyButtonsMsg: true,
dynamicReplyButtons: [
{
buttonId: 'idSim',
buttonId: 'idYes',
buttonText: {
displayText: 'SIM',
displayText: 'YES',
},
type: 1,
},
{
buttonId: 'idNao',
buttonId: 'idNo',
buttonText: {
displayText: 'NÃO',
displayText: 'NO',
},
type: 1,
},
],
});
}
} catch (e) {
console.log(e);
} catch (error) {
console.log(error);
}
});
}
6 changes: 3 additions & 3 deletions examples/newsletter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const wppconnect = require('../../dist');

wppconnect
.create({
session: 'teste',
session: 'test',
})
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
.catch((error) => {
console.log(error);
});

function start(client) {
Expand Down
6 changes: 3 additions & 3 deletions examples/orders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const froms = [];
wppconnect
.create()
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
.catch((error) => {
console.log(error);
});

function start(client) {
Expand All @@ -33,7 +33,7 @@ function start(client) {
froms.push(message.from);
client.sendText(
message.from,
`Please, save your order id, and get order for test porpouse`
`Please save your order ID, and get your order for testing purposes`
);
client.sendText(message.from, `${order.id}`);
}
Expand Down
Loading

0 comments on commit 94f635e

Please sign in to comment.