Compare commits

...

106 Commits

Author SHA1 Message Date
Leifer Mendez
2d5ac2664b fix(adapter): 🔥 improvement baileys 2022-12-14 18:44:50 +01:00
Leifer Mendez
4e0fcbd834 feat(provider): new added baileys
Baileys Provider
2022-12-14 14:15:09 +01:00
Leifer Mendez
e37fd0da36 fix(adapter): 🚀 venom update - cli - qr iamge
fix(adapter): 🚀 venom update - cli - qr iamge
2022-12-14 13:39:00 +01:00
Leifer Mendez
ca6afbb87f fix(adapter): 🚀 venom update - cli - qr iamge 2022-12-14 13:37:57 +01:00
Leifer Mendez
66f75f8722 feat(provider): new provider - venon configuracion inicial provi…
feat(provider): new provider - venon configuracion inicial provi…
2022-12-14 11:10:19 +01:00
Juan Daniel
31c83f5d68 feat(provider): solution error utils venom 2022-12-13 19:45:55 +01:00
Juan Daniel
1b83871cca feat(provider): solution error buttons 2022-12-13 19:44:41 +01:00
Juan Daniel
337c2e94bc feat(provider): added tamplate venom 2022-12-13 16:37:44 +01:00
Juan Daniel
01fe9ebc9a feat(provider): added new venom provider 2022-12-13 14:39:51 +01:00
Joseph VTX
23b2e8e439 feat(provider): baileysProvider
Baileys WebSocket - Fast
2022-12-12 20:25:53 -05:00
Leifer Mendez
f799498dec Merge pull request #200 from cheveguerra/dev
fix: actualizar ejemplo app.js
2022-12-12 23:22:04 +01:00
17466138dd fix: actualizar app.js de ejemplo
Corrige saltos de linea inecesarios.
2022-12-12 16:15:49 -06:00
63ca8e8892 Merge branch 'leifermendez:dev' into dev 2022-12-12 15:10:18 -06:00
60fdbf3d3c fix: actualizar ejemplo app.js
Se agregan flujos secundarios al app,js de ejemplo.
2022-12-12 14:42:37 -06:00
Leifer Mendez
e8c249897d docs(info): update
Docs: Cambios en la documentación
2022-12-12 19:54:36 +01:00
55d12810d9 docs: cambios en docs 2022-12-12 12:43:45 -06:00
639e2defa7 docs: cambios en la documentacion 2022-12-12 12:41:01 -06:00
b97d8ba8f1 docs: pagina de entrada 2022-12-12 12:27:33 -06:00
Leifer Mendez
f05b76936a chore(release): 0.1.2
chore(release): 0.1.2
2022-12-12 18:18:34 +01:00
Leifer Mendez
0a4e1e052a chore(release): 0.1.2 2022-12-12 18:14:32 +01:00
github-actions[bot]
28d88c282c ci(version): automatic - "${date}" updated versions every packages 2022-12-12 17:13:21 +00:00
Leifer Mendez
a2be57f0aa fix(cli): 🎨 starters
fix(cli): 🎨 starters
2022-12-12 18:12:22 +01:00
Leifer Mendez
670ecf121b fix(cli): 🎨 starters
fix(cli): 🎨 starters
2022-12-12 18:11:41 +01:00
Leifer Mendez
79e2318256 fix(cli): 🎨 starters 2022-12-12 18:09:27 +01:00
Leifer Mendez
87ba43a553 fix(cli): 🎨 starters 2022-12-12 18:04:17 +01:00
Leifer Mendez
acc1d37e4f Merge remote-tracking branch 'origin/dev' into fix/create-script 2022-12-12 17:53:13 +01:00
github-actions[bot]
c578d039c0 ci(version): automatic - "${date}" updated versions every packages 2022-12-12 16:49:37 +00:00
Leifer Mendez
162067104e Merge pull request #195 from leifermendez/dev
Dev
2022-12-12 17:48:07 +01:00
Leifer Mendez
ea677b6eea Merge pull request #193 from cheveguerra/fix/starter-app
Fix/starter app
2022-12-12 17:43:15 +01:00
Leifer Mendez
a82b1cfb57 chore(release): 0.1.1
chore(release): 0.1.1
2022-12-12 17:40:59 +01:00
61d0324261 fix: fix dependencias
Se agregaron bot, cli, database y provider a las dependencias
2022-12-12 10:37:17 -06:00
Leifer Mendez
4d692e0a26 chore(release): 0.1.1 2022-12-12 17:35:51 +01:00
Leifer Mendez
9de7eada87 chore(release): 0.1.1 2022-12-12 17:25:04 +01:00
Leifer Mendez
8f81d995a4 chore(release): 0.1.1
chore(release): 0.1.1
2022-12-12 17:19:25 +01:00
Leifer Mendez
024f13691d chore(release): 0.1.1 2022-12-12 17:18:04 +01:00
Leifer Mendez
4aa91cb22a chore(release): 0.1.1
chore(release): 0.1.1
2022-12-12 17:12:51 +01:00
Leifer Mendez
9ecafe5fc8 chore(release): 0.1.1 2022-12-12 17:03:30 +01:00
Leifer Mendez
d039e2aacd chore(release): 0.3.0 2022-12-12 17:03:06 +01:00
Leifer Mendez
5173a6c467 chore(release): 0.2.1 2022-12-12 17:02:37 +01:00
Leifer Mendez
1d08682393 chore(release): 0.2.0 2022-12-12 17:01:41 +01:00
Leifer Mendez
0bb251b4d5 chore(release): 0.0.3 2022-12-12 17:00:43 +01:00
Leifer Mendez
04baa7f6fd chore(release): 0.2.0 2022-12-12 16:58:06 +01:00
Leifer Mendez
32212fb52d fix(cli): 🐛 path 2022-12-12 16:50:15 +01:00
Leifer Mendez
aa61a1e1b5 Merge branch 'dev' into fix/create-script 2022-12-12 16:47:55 +01:00
Leifer Mendez
5ecf9c6ba7 Merge branch 'fix/version' into dev 2022-12-12 15:13:02 +01:00
Leifer Mendez
d233cbac22 Merge remote-tracking branch 'origin/dev' into fix/version 2022-12-12 15:12:01 +01:00
github-actions[bot]
10098f018f ci(version): automatic - ${date} updated versions every packages 2022-12-12 14:02:54 +00:00
Leifer Mendez
70de13ef6a Merge pull request #190 from leifermendez/dev
action update
2022-12-12 15:00:24 +01:00
Leifer Mendez
f912fd328f Merge pull request #189 from leifermendez:fix/version
done ci
2022-12-12 14:56:31 +01:00
Leifer Mendez
6a86da2851 ci(ci): releases action 2022-12-12 14:55:40 +01:00
Leifer Mendez
1a2a246bf8 ci(ci): releases action
ci(ci):  releases action
2022-12-12 14:51:49 +01:00
Leifer Mendez
248d04b666 ci(ci): releases action 2022-12-12 14:50:45 +01:00
Leifer Mendez
41e96ad027 fix(ci): github action
fix(ci):  github action
2022-12-12 14:48:40 +01:00
Leifer Mendez
f2fd254d17 ci(ci): releases action
ci(ci):  releases action
2022-12-12 14:46:50 +01:00
Leifer Mendez
7790391b50 ci(ci): releases action 2022-12-12 14:43:38 +01:00
Leifer Mendez
b827a0ab22 fix(ci): github action
fix(ci):  github action
2022-12-12 14:37:15 +01:00
Leifer Mendez
4142ca4fd5 fix(ci): github action 2022-12-12 14:36:32 +01:00
Juan Daniel
fee7c2e967 feat(provider): new provider - venon configuracion inicial provider venom 2022-12-12 13:12:29 +01:00
Leifer Mendez
091544ac3f fix(ci): github action
fix(ci):  github action
2022-12-12 12:11:40 +01:00
Leifer Mendez
2ce342a0cb fix(ci): github action 2022-12-12 12:10:15 +01:00
Leifer Mendez
781779328f fix(ci): github action
fix(ci):  github action
2022-12-12 11:59:43 +01:00
Leifer Mendez
dfced8c594 fix(ci): github action 2022-12-12 11:59:09 +01:00
Leifer Mendez
aaa4ce8372 fix(ci): github action
fix(ci):  github action
2022-12-12 11:07:02 +01:00
Leifer Mendez
9ddf144244 fix(ci): github action 2022-12-12 11:06:25 +01:00
Leifer Mendez
b465de55a0 fix(ci): github action 2022-12-12 11:02:50 +01:00
Leifer Mendez
cf1dc6fac8 fix(ci): github action
fix(ci):  github action
2022-12-12 10:54:07 +01:00
Leifer Mendez
739c63d025 Merge branch 'fix/version' of github.com:leifermendez/bot-whatsapp into fix/version 2022-12-12 10:46:15 +01:00
Leifer Mendez
8d897f824e fix(ci): github action 2022-12-12 10:46:02 +01:00
Leifer Mendez
aad129ea94 Create FUNDING.yml 2022-12-12 00:31:06 +01:00
Leifer Mendez (githubaction)
e48b29ed29 ci(version): updated versions every packages 2022-12-11 21:35:22 +00:00
Leifer Mendez
c64560bfc3 ci(version): updated versions every packages
ci(version):  updated versions every packages
2022-12-11 22:31:51 +01:00
Leifer Mendez
255ba86506 ci(version): updated versions every packages 2022-12-11 22:31:21 +01:00
Leifer Mendez
cd2dad9d26 ci(version): updated versions every packages
ci(version):  updated versions every packages
2022-12-11 22:27:02 +01:00
Leifer Mendez
c7ff6b4794 ci(version): updated versions every packages 2022-12-11 22:26:29 +01:00
Leifer Mendez
628d55df37 ci(version): updated versions every packages
ci(version):  updated versions every packages
2022-12-11 22:18:46 +01:00
Leifer Mendez
0059a1e7fb ci(version): updated versions every packages 2022-12-11 22:18:01 +01:00
Leifer Mendez
73ea7c0063 ci(version): updated versions every packages 2022-12-11 22:16:09 +01:00
Leifer Mendez
cb9f4befa0 fix/version
fix/version
2022-12-11 22:11:24 +01:00
Leifer Mendez
decccb672a ci(ci): push 2022-12-11 22:10:42 +01:00
Leifer Mendez
51466bf1c7 ci(ci): push 2022-12-11 22:09:29 +01:00
Leifer Mendez
397798790e feat(cli): create-starter
feat(cli): create-starter
2022-12-11 22:00:53 +01:00
Leifer Mendez
d3b8310180 fix(cli): create-starter 2022-12-11 21:58:13 +01:00
Leifer Mendez
7797c2b461 fix(cli): update cli copy 2022-12-11 20:59:28 +01:00
Leifer Mendez
929e74c84b fix(starter): pre-copy fix
pre-copy fix
2022-12-11 13:46:52 +01:00
08e2552907 fix: pre-copy fix 2022-12-11 05:55:31 -06:00
6617107ab8 fix: pre-copy fix 2022-12-11 05:48:51 -06:00
Leifer Mendez
8921959ea0 Merge pull request #165 from leifermendez:fix/version
fix(ci):  balance version
2022-12-10 21:49:33 +01:00
Leifer Mendez
ec46cfdd65 fix(ci): balance version 2022-12-10 21:48:55 +01:00
Leifer Mendez
bfb69d9a95 fix(cli): clean eslinter
fix(cli):  clean eslinter
2022-12-10 21:40:20 +01:00
Leifer Mendez
15f6972257 fix(cli): clean eslinter 2022-12-10 21:38:23 +01:00
Leifer Mendez
2319db3009 fix(cli): 🔥 create script - templates
fix(cli): 🔥 create script - templates
2022-12-10 21:33:07 +01:00
Leifer Mendez
9cb98b5e73 fix(cli): 🔥 create script - templates 2022-12-10 21:27:58 +01:00
Leifer Mendez
2999e0e753 fix(cli): 🔥 create script - templates
fix(cli): 🔥 create script - templates
2022-12-10 21:22:48 +01:00
Leifer Mendez
af716b7537 fix(cli): 🔥 create script - templates 2022-12-10 21:20:57 +01:00
Leifer Mendez
c6999c8493 fix(cli): 🔥 create script - templates
fix(cli): 🔥 create script - templates
2022-12-10 21:20:07 +01:00
Leifer Mendez
d4b49a9bd7 fix(cli): 🔥 create script - templates 2022-12-10 21:19:38 +01:00
Leifer Mendez
eebc3c9806 fix(cli): 🔥 create script - templates 2022-12-10 21:17:29 +01:00
Leifer Mendez
257f1cc12d ci(ci): update ci
ci(ci):  update ci
2022-12-09 15:00:05 +01:00
Leifer Mendez
1b8ed93367 ci(ci): update ci
ci(ci):  update ci
2022-12-09 14:18:06 +01:00
Leifer Mendez
e5a9db7e12 feat(ci): update ci
feat(ci): update ci
2022-12-09 14:13:43 +01:00
Leifer Mendez
f05ff4cf88 style: ✏️ fixed typos
style: ✏️ fixed typos
2022-12-08 22:48:12 +01:00
Leifer Mendez
5735b49e25 Merge pull request #155 from leifermendez/feat/releases
feat(release): added
2022-12-08 22:23:03 +01:00
Leifer Mendez
cb33c0df68 Merge pull request #154 from leifermendez/feat/releases
feat(relases): added
2022-12-08 22:19:25 +01:00
6rak0
8c6023e93b style: ✏️ fixed typos
fixed typos
2022-12-08 14:34:41 -06:00
Leifer Mendez
5d7c297f2f Merge pull request #150 from leifermendez/fix/ci-yarn
ci(action): update
2022-12-08 20:17:46 +01:00
Leifer Mendez
bb3f21b056 Merge pull request #149 from leifermendez/fix/ci-yarn
fix(ci): update yarn
2022-12-08 20:13:02 +01:00
63 changed files with 3167 additions and 848 deletions

9
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: leifermendez
open_collective: bot-whatsapp
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://www.buymeacoffee.com/leifermendez

View File

@@ -1,12 +1,8 @@
name: BotWhatsapp CI
name: BotWhatsapp Build-Test
on:
push:
branches:
- main
pull_request:
branches:
- main
- dev
jobs:
@@ -38,49 +34,6 @@ jobs:
- name: Build Eslint rules
run: yarn lint:fix
############ RELEASE ############
release:
name: Release
runs-on: ubuntu-latest
needs:
- build-package
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- run: corepack enable
- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
- name: Build Package
run: yarn build
- name: Release @bot-whatsapp/bot
run: yarn node ./scripts/release.js --name=bot --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/cli
run: yarn node ./scripts/release.js --name=cli --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/database
run: yarn node ./scripts/release.js --name=database --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/provider
run: yarn node ./scripts/release.js --name=provider --version= --token="${{ secrets.NPM_TOKEN }}"
############ UNIT TEST ############
test-unit:
name: Unit Tests

56
.github/workflows/releases-dev.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: BotWhatsapp Releases(DEV)
on:
push:
branches:
- next-release
jobs:
############ RELEASE ############
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- run: corepack enable
- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
- name: Build Package
run: yarn build
- name: Release @bot-whatsapp/bot
run: yarn node ./scripts/release.js --name=bot --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/cli
run: yarn node ./scripts/release.js --name=cli --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/database
run: yarn node ./scripts/release.js --name=database --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/provider
run: yarn node ./scripts/release.js --name=provider --version= --token="${{ secrets.NPM_TOKEN }}"
- name: Commit Versioning & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'ci(version): :zap: automatic - "${date}" updated versions every packages'
branch: 'dev'

60
.github/workflows/releases.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: BotWhatsapp Releases(Prod)
on:
push:
tags:
- 'v*.*.*'
jobs:
############ RELEASE ############
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- run: corepack enable
- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
- name: Build Package
run: yarn build
- name: Release @bot-whatsapp/bot
run: yarn node ./scripts/release.js --name=bot --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/cli
run: yarn node ./scripts/release.js --name=cli --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/database
run: yarn node ./scripts/release.js --name=database --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"
- name: Release @bot-whatsapp/provider
run: yarn node ./scripts/release.js --name=provider --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"
- name: Commit Versioning & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'ci(version): :zap: automatic - "${date}" updated versions every packages'
branch: 'dev'

4
.gitignore vendored
View File

@@ -1,7 +1,9 @@
/node_modules
/packages/*/starters
/packages/*/node_modules
/packages/*/dist
/packages/*/docs/dist
/packages/provider/src/venom/tokens
session.json
chats/*
!chats/.gitkeep
@@ -28,6 +30,8 @@ tmp/
!.yarn/plugins/@yarnpkg/plugin-postinstall.cjs
.fleet/
example-app*/
base-*/
!starters/apps/base-*/
qr.svg
package-lock.json
yarn-error.log

View File

@@ -2,6 +2,231 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.1.2](https://github.com/leifermendez/bot-whatsapp/compare/v0.1.1...v0.1.2) (2022-12-12)
### Bug Fixes
* **cli:** :art: starters ([79e2318](https://github.com/leifermendez/bot-whatsapp/commit/79e231825613f33bfec2ae8e93139f885c199c7a))
* **cli:** :art: starters ([87ba43a](https://github.com/leifermendez/bot-whatsapp/commit/87ba43a5535be0893a7701a3b6a085ee5d29e7c5))
* fix dependencias ([61d0324](https://github.com/leifermendez/bot-whatsapp/commit/61d032426119341187a470035d49b8b252ca46cd))
### [0.1.1](https://github.com/leifermendez/bot-whatsapp/compare/v0.3.0...v0.1.1) (2022-12-12)
## 0.3.0 (2022-12-12)
### ⚠ BREAKING CHANGES
* 🧨 NO
### Features
* (🎸) add onClick prop to component ([4ae3898](https://github.com/leifermendez/bot-whatsapp/commit/4ae389846d38c133f6bb2129ae373eed39d9d08d))
* **adapter:** added adapter mysql ([717a7dc](https://github.com/leifermendez/bot-whatsapp/commit/717a7dc95fbc107ec6f55387aff606c47144baa4))
* **adapter:** implementation of json file adapter ([5e1a373](https://github.com/leifermendez/bot-whatsapp/commit/5e1a3737303c843095984f6357564ea18458362f))
* **adapter:** mysql adapter ([8d73c86](https://github.com/leifermendez/bot-whatsapp/commit/8d73c86946d07aa80e5b375b62b84a88b2892e03))
* **adapter:** sql is added to create the table ([4b7de0f](https://github.com/leifermendez/bot-whatsapp/commit/4b7de0f6901524fa2c09271c3a99c364e6b3c260))
* **bot:** :fire: improvement provider handler ([4154cc2](https://github.com/leifermendez/bot-whatsapp/commit/4154cc223091a46d3203d3a378cd42f61749a5fa))
* **bot:** :zap: add send image function ([ce8a96b](https://github.com/leifermendez/bot-whatsapp/commit/ce8a96b958ff814c65d8fb4dbd5eaed5cc83a1ed))
* **ci:** :art: add releases ([b115dc3](https://github.com/leifermendez/bot-whatsapp/commit/b115dc3654996f049837bfb6b5d039a2313df0ad))
* **ci:** :art: relases script ([2e906bc](https://github.com/leifermendez/bot-whatsapp/commit/2e906bce79f7d854d437334e1d0c2cd270b0bbc6))
* **ci:** update ci ([e5a9db7](https://github.com/leifermendez/bot-whatsapp/commit/e5a9db7e12340c4f5baa66e8b20585b63daa3bcf))
* **cli:** create-starter ([3977987](https://github.com/leifermendez/bot-whatsapp/commit/397798790ef5857ca758b0df8384c6a4bfacc181))
* **provider:** :fire: add twilii (weoking) ([4350dff](https://github.com/leifermendez/bot-whatsapp/commit/4350dff22a7de69ba6d35ecbdd67e59b810bd46f))
* **provider:** added twilio provider ([8dd3be9](https://github.com/leifermendez/bot-whatsapp/commit/8dd3be909b36717f6b54e141a5f48d2722d4855c))
* **release:** added ([1988948](https://github.com/leifermendez/bot-whatsapp/commit/1988948c30d922beb7b83faab96d1d59cf7f5f90))
* **release:** added ([f4ad704](https://github.com/leifermendez/bot-whatsapp/commit/f4ad7040abf619635480c30babd6f1159c7af85a))
### Bug Fixes
* **adapter:** conflict resolution ([4b307ef](https://github.com/leifermendez/bot-whatsapp/commit/4b307efe79c738a5c4e04ff1c07ca247d827593c))
* **adapter:** corrections are made to the adapter ([afa6771](https://github.com/leifermendez/bot-whatsapp/commit/afa677190392d48715930ebe2b1e15c7619d730f))
* **bot:** :zap: added delay promises ([73caf09](https://github.com/leifermendez/bot-whatsapp/commit/73caf090ba9013132e5dcb7761a10939dc9ac300))
* **bot:** :zap: fix sensitive case ([24ac9fb](https://github.com/leifermendez/bot-whatsapp/commit/24ac9fbf48f80eeb521a36bc938af3a70dd82303))
* **bot:** :zap: flow improvement + add utils ([a7b19d9](https://github.com/leifermendez/bot-whatsapp/commit/a7b19d9bff5ea66ff888555c3df37ae0e20b612a))
* **bot:** update ([49698bf](https://github.com/leifermendez/bot-whatsapp/commit/49698bfda9d2a53f7b1a7e1724a796698601fbaa))
* **ci:** :zap: balance version ([ec46cfd](https://github.com/leifermendez/bot-whatsapp/commit/ec46cfdd657c08c8e90261613f00cfc080f1e1d6))
* **ci:** :zap: github action ([b827a0a](https://github.com/leifermendez/bot-whatsapp/commit/b827a0ab225b89bb8117c82628db0679c09b4102))
* **ci:** :zap: github action ([4142ca4](https://github.com/leifermendez/bot-whatsapp/commit/4142ca4fd552e7005f3b1397a76b90a2e574d19d))
* **ci:** :zap: github action ([091544a](https://github.com/leifermendez/bot-whatsapp/commit/091544ac3fac0c16925e856e1aec64bcad0ecf6d))
* **ci:** :zap: github action ([2ce342a](https://github.com/leifermendez/bot-whatsapp/commit/2ce342a0cb15019d5084ca06dc30e342b030ea10))
* **ci:** :zap: github action ([7817793](https://github.com/leifermendez/bot-whatsapp/commit/781779328f93ef8b0e6e0f85c6cd05ae782112fb))
* **ci:** :zap: github action ([dfced8c](https://github.com/leifermendez/bot-whatsapp/commit/dfced8c594e9175c81e837af359631ba055b7e1a))
* **ci:** :zap: github action ([aaa4ce8](https://github.com/leifermendez/bot-whatsapp/commit/aaa4ce837229fd51e274de3d91e1d9d615ac69fd))
* **ci:** :zap: github action ([9ddf144](https://github.com/leifermendez/bot-whatsapp/commit/9ddf144244cd6877e7d26f576387814459f2befb))
* **ci:** :zap: github action ([b465de5](https://github.com/leifermendez/bot-whatsapp/commit/b465de55a0e511213d1a7760a74efa102172c85e))
* **ci:** :zap: github action ([cf1dc6f](https://github.com/leifermendez/bot-whatsapp/commit/cf1dc6fac810545e5a2b63f31f71322f37329e38))
* **ci:** :zap: github action ([8d897f8](https://github.com/leifermendez/bot-whatsapp/commit/8d897f824e27a55ca011163092a813a7e8f426af))
* **ci:** ci ([f55cfae](https://github.com/leifermendez/bot-whatsapp/commit/f55cfae6e4ccc1df949212999406680020d27f9c))
* **ci:** ci ([671c5b3](https://github.com/leifermendez/bot-whatsapp/commit/671c5b37f33360e8cb754625b8dd6e83bce9014d))
* **cli:** :bug: path ([32212fb](https://github.com/leifermendez/bot-whatsapp/commit/32212fb52d206bf6f8d753a86d9ce40aa0db2a5d))
* **cli:** :fire: create script - templates ([2319db3](https://github.com/leifermendez/bot-whatsapp/commit/2319db3009501fe57ae21e60ad286eb68c46f4fd))
* **cli:** :fire: create script - templates ([9cb98b5](https://github.com/leifermendez/bot-whatsapp/commit/9cb98b5e73fca3c3f5e70a8497badc31e494b943))
* **cli:** :fire: create script - templates ([2999e0e](https://github.com/leifermendez/bot-whatsapp/commit/2999e0e753f31a8b9e6d7c117e78cdb5656e203a))
* **cli:** :fire: create script - templates ([af716b7](https://github.com/leifermendez/bot-whatsapp/commit/af716b75372899877a81b528b58278376166d0ad))
* **cli:** :fire: create script - templates ([c6999c8](https://github.com/leifermendez/bot-whatsapp/commit/c6999c84931083a87b5717db58003be68244707e))
* **cli:** :fire: create script - templates ([d4b49a9](https://github.com/leifermendez/bot-whatsapp/commit/d4b49a9bd7085070f0c5964d2903f10b71bde0b3))
* **cli:** :fire: create script - templates ([eebc3c9](https://github.com/leifermendez/bot-whatsapp/commit/eebc3c980638d88f11a0d93b8344f3ff345c7ee5))
* **cli:** :zap: clean eslinter ([bfb69d9](https://github.com/leifermendez/bot-whatsapp/commit/bfb69d9a9574a757ae02748b6c5f5afa3eac68e6))
* **cli:** :zap: clean eslinter ([15f6972](https://github.com/leifermendez/bot-whatsapp/commit/15f697225775a0f0e0a440cd980f7fb8f51a1056))
* **cli:** :zap: create-starter ([d3b8310](https://github.com/leifermendez/bot-whatsapp/commit/d3b8310180d2ad813733b1d18f2c32d7d947740a))
* **cli:** :zap: update cli copy ([7797c2b](https://github.com/leifermendez/bot-whatsapp/commit/7797c2b46133697e2a591adab2b67e66b34a1cfe))
* **fix:** fix ([6483545](https://github.com/leifermendez/bot-whatsapp/commit/648354500b123f20044f5ac2e8a26b15f16d1b8d))
* **fix:** fix ([28c0480](https://github.com/leifermendez/bot-whatsapp/commit/28c0480b8bfa6b24394095f57c36ef89c9aeb566))
* **linter:** update linter and commitlint ([70a94ab](https://github.com/leifermendez/bot-whatsapp/commit/70a94ab2c6f8e4122780c77bc3a621944883e621))
* pre-copy fix ([08e2552](https://github.com/leifermendez/bot-whatsapp/commit/08e2552907c48cfeaac843457a18bf2032e6f8aa))
* pre-copy fix ([6617107](https://github.com/leifermendez/bot-whatsapp/commit/6617107ab824215c449e26eae6c2bb327ecfc092))
* **starter:** pre-copy fix ([929e74c](https://github.com/leifermendez/bot-whatsapp/commit/929e74c84b667ec13cb5490b3b951cb8df15ebd1))
* (💍) Is justa test! ([37d04e9](https://github.com/leifermendez/bot-whatsapp/commit/37d04e9e89d3f01fdc367654ba60fb11ab2614c4))
### [0.2.1](https://github.com/leifermendez/bot-whatsapp/compare/v0.2.0...v0.2.1) (2022-12-12)
## 0.2.0 (2022-12-12)
### ⚠ BREAKING CHANGES
* 🧨 NO
### Features
* (🎸) add onClick prop to component ([4ae3898](https://github.com/leifermendez/bot-whatsapp/commit/4ae389846d38c133f6bb2129ae373eed39d9d08d))
* **adapter:** added adapter mysql ([717a7dc](https://github.com/leifermendez/bot-whatsapp/commit/717a7dc95fbc107ec6f55387aff606c47144baa4))
* **adapter:** implementation of json file adapter ([5e1a373](https://github.com/leifermendez/bot-whatsapp/commit/5e1a3737303c843095984f6357564ea18458362f))
* **adapter:** mysql adapter ([8d73c86](https://github.com/leifermendez/bot-whatsapp/commit/8d73c86946d07aa80e5b375b62b84a88b2892e03))
* **adapter:** sql is added to create the table ([4b7de0f](https://github.com/leifermendez/bot-whatsapp/commit/4b7de0f6901524fa2c09271c3a99c364e6b3c260))
* **bot:** :fire: improvement provider handler ([4154cc2](https://github.com/leifermendez/bot-whatsapp/commit/4154cc223091a46d3203d3a378cd42f61749a5fa))
* **bot:** :zap: add send image function ([ce8a96b](https://github.com/leifermendez/bot-whatsapp/commit/ce8a96b958ff814c65d8fb4dbd5eaed5cc83a1ed))
* **ci:** :art: add releases ([b115dc3](https://github.com/leifermendez/bot-whatsapp/commit/b115dc3654996f049837bfb6b5d039a2313df0ad))
* **ci:** :art: relases script ([2e906bc](https://github.com/leifermendez/bot-whatsapp/commit/2e906bce79f7d854d437334e1d0c2cd270b0bbc6))
* **ci:** update ci ([e5a9db7](https://github.com/leifermendez/bot-whatsapp/commit/e5a9db7e12340c4f5baa66e8b20585b63daa3bcf))
* **cli:** create-starter ([3977987](https://github.com/leifermendez/bot-whatsapp/commit/397798790ef5857ca758b0df8384c6a4bfacc181))
* **provider:** :fire: add twilii (weoking) ([4350dff](https://github.com/leifermendez/bot-whatsapp/commit/4350dff22a7de69ba6d35ecbdd67e59b810bd46f))
* **provider:** added twilio provider ([8dd3be9](https://github.com/leifermendez/bot-whatsapp/commit/8dd3be909b36717f6b54e141a5f48d2722d4855c))
* **release:** added ([1988948](https://github.com/leifermendez/bot-whatsapp/commit/1988948c30d922beb7b83faab96d1d59cf7f5f90))
* **release:** added ([f4ad704](https://github.com/leifermendez/bot-whatsapp/commit/f4ad7040abf619635480c30babd6f1159c7af85a))
### Bug Fixes
* **adapter:** conflict resolution ([4b307ef](https://github.com/leifermendez/bot-whatsapp/commit/4b307efe79c738a5c4e04ff1c07ca247d827593c))
* **adapter:** corrections are made to the adapter ([afa6771](https://github.com/leifermendez/bot-whatsapp/commit/afa677190392d48715930ebe2b1e15c7619d730f))
* **bot:** :zap: added delay promises ([73caf09](https://github.com/leifermendez/bot-whatsapp/commit/73caf090ba9013132e5dcb7761a10939dc9ac300))
* **bot:** :zap: fix sensitive case ([24ac9fb](https://github.com/leifermendez/bot-whatsapp/commit/24ac9fbf48f80eeb521a36bc938af3a70dd82303))
* **bot:** :zap: flow improvement + add utils ([a7b19d9](https://github.com/leifermendez/bot-whatsapp/commit/a7b19d9bff5ea66ff888555c3df37ae0e20b612a))
* **bot:** update ([49698bf](https://github.com/leifermendez/bot-whatsapp/commit/49698bfda9d2a53f7b1a7e1724a796698601fbaa))
* **ci:** :zap: balance version ([ec46cfd](https://github.com/leifermendez/bot-whatsapp/commit/ec46cfdd657c08c8e90261613f00cfc080f1e1d6))
* **ci:** :zap: github action ([b827a0a](https://github.com/leifermendez/bot-whatsapp/commit/b827a0ab225b89bb8117c82628db0679c09b4102))
* **ci:** :zap: github action ([4142ca4](https://github.com/leifermendez/bot-whatsapp/commit/4142ca4fd552e7005f3b1397a76b90a2e574d19d))
* **ci:** :zap: github action ([091544a](https://github.com/leifermendez/bot-whatsapp/commit/091544ac3fac0c16925e856e1aec64bcad0ecf6d))
* **ci:** :zap: github action ([2ce342a](https://github.com/leifermendez/bot-whatsapp/commit/2ce342a0cb15019d5084ca06dc30e342b030ea10))
* **ci:** :zap: github action ([7817793](https://github.com/leifermendez/bot-whatsapp/commit/781779328f93ef8b0e6e0f85c6cd05ae782112fb))
* **ci:** :zap: github action ([dfced8c](https://github.com/leifermendez/bot-whatsapp/commit/dfced8c594e9175c81e837af359631ba055b7e1a))
* **ci:** :zap: github action ([aaa4ce8](https://github.com/leifermendez/bot-whatsapp/commit/aaa4ce837229fd51e274de3d91e1d9d615ac69fd))
* **ci:** :zap: github action ([9ddf144](https://github.com/leifermendez/bot-whatsapp/commit/9ddf144244cd6877e7d26f576387814459f2befb))
* **ci:** :zap: github action ([b465de5](https://github.com/leifermendez/bot-whatsapp/commit/b465de55a0e511213d1a7760a74efa102172c85e))
* **ci:** :zap: github action ([cf1dc6f](https://github.com/leifermendez/bot-whatsapp/commit/cf1dc6fac810545e5a2b63f31f71322f37329e38))
* **ci:** :zap: github action ([8d897f8](https://github.com/leifermendez/bot-whatsapp/commit/8d897f824e27a55ca011163092a813a7e8f426af))
* **ci:** ci ([f55cfae](https://github.com/leifermendez/bot-whatsapp/commit/f55cfae6e4ccc1df949212999406680020d27f9c))
* **ci:** ci ([671c5b3](https://github.com/leifermendez/bot-whatsapp/commit/671c5b37f33360e8cb754625b8dd6e83bce9014d))
* **cli:** :bug: path ([32212fb](https://github.com/leifermendez/bot-whatsapp/commit/32212fb52d206bf6f8d753a86d9ce40aa0db2a5d))
* **cli:** :fire: create script - templates ([2319db3](https://github.com/leifermendez/bot-whatsapp/commit/2319db3009501fe57ae21e60ad286eb68c46f4fd))
* **cli:** :fire: create script - templates ([9cb98b5](https://github.com/leifermendez/bot-whatsapp/commit/9cb98b5e73fca3c3f5e70a8497badc31e494b943))
* **cli:** :fire: create script - templates ([2999e0e](https://github.com/leifermendez/bot-whatsapp/commit/2999e0e753f31a8b9e6d7c117e78cdb5656e203a))
* **cli:** :fire: create script - templates ([af716b7](https://github.com/leifermendez/bot-whatsapp/commit/af716b75372899877a81b528b58278376166d0ad))
* **cli:** :fire: create script - templates ([c6999c8](https://github.com/leifermendez/bot-whatsapp/commit/c6999c84931083a87b5717db58003be68244707e))
* **cli:** :fire: create script - templates ([d4b49a9](https://github.com/leifermendez/bot-whatsapp/commit/d4b49a9bd7085070f0c5964d2903f10b71bde0b3))
* **cli:** :fire: create script - templates ([eebc3c9](https://github.com/leifermendez/bot-whatsapp/commit/eebc3c980638d88f11a0d93b8344f3ff345c7ee5))
* **cli:** :zap: clean eslinter ([bfb69d9](https://github.com/leifermendez/bot-whatsapp/commit/bfb69d9a9574a757ae02748b6c5f5afa3eac68e6))
* **cli:** :zap: clean eslinter ([15f6972](https://github.com/leifermendez/bot-whatsapp/commit/15f697225775a0f0e0a440cd980f7fb8f51a1056))
* **cli:** :zap: create-starter ([d3b8310](https://github.com/leifermendez/bot-whatsapp/commit/d3b8310180d2ad813733b1d18f2c32d7d947740a))
* **cli:** :zap: update cli copy ([7797c2b](https://github.com/leifermendez/bot-whatsapp/commit/7797c2b46133697e2a591adab2b67e66b34a1cfe))
* **fix:** fix ([6483545](https://github.com/leifermendez/bot-whatsapp/commit/648354500b123f20044f5ac2e8a26b15f16d1b8d))
* **fix:** fix ([28c0480](https://github.com/leifermendez/bot-whatsapp/commit/28c0480b8bfa6b24394095f57c36ef89c9aeb566))
* **linter:** update linter and commitlint ([70a94ab](https://github.com/leifermendez/bot-whatsapp/commit/70a94ab2c6f8e4122780c77bc3a621944883e621))
* pre-copy fix ([08e2552](https://github.com/leifermendez/bot-whatsapp/commit/08e2552907c48cfeaac843457a18bf2032e6f8aa))
* pre-copy fix ([6617107](https://github.com/leifermendez/bot-whatsapp/commit/6617107ab824215c449e26eae6c2bb327ecfc092))
* **starter:** pre-copy fix ([929e74c](https://github.com/leifermendez/bot-whatsapp/commit/929e74c84b667ec13cb5490b3b951cb8df15ebd1))
* (💍) Is justa test! ([37d04e9](https://github.com/leifermendez/bot-whatsapp/commit/37d04e9e89d3f01fdc367654ba60fb11ab2614c4))
### [0.0.3](https://github.com/leifermendez/bot-whatsapp/compare/v0.2.0...v0.0.3) (2022-12-12)
## 0.2.0 (2022-12-12)
### ⚠ BREAKING CHANGES
* 🧨 NO
### Features
* (🎸) add onClick prop to component ([4ae3898](https://github.com/leifermendez/bot-whatsapp/commit/4ae389846d38c133f6bb2129ae373eed39d9d08d))
* **adapter:** added adapter mysql ([717a7dc](https://github.com/leifermendez/bot-whatsapp/commit/717a7dc95fbc107ec6f55387aff606c47144baa4))
* **adapter:** implementation of json file adapter ([5e1a373](https://github.com/leifermendez/bot-whatsapp/commit/5e1a3737303c843095984f6357564ea18458362f))
* **adapter:** mysql adapter ([8d73c86](https://github.com/leifermendez/bot-whatsapp/commit/8d73c86946d07aa80e5b375b62b84a88b2892e03))
* **adapter:** sql is added to create the table ([4b7de0f](https://github.com/leifermendez/bot-whatsapp/commit/4b7de0f6901524fa2c09271c3a99c364e6b3c260))
* **bot:** :fire: improvement provider handler ([4154cc2](https://github.com/leifermendez/bot-whatsapp/commit/4154cc223091a46d3203d3a378cd42f61749a5fa))
* **bot:** :zap: add send image function ([ce8a96b](https://github.com/leifermendez/bot-whatsapp/commit/ce8a96b958ff814c65d8fb4dbd5eaed5cc83a1ed))
* **ci:** :art: add releases ([b115dc3](https://github.com/leifermendez/bot-whatsapp/commit/b115dc3654996f049837bfb6b5d039a2313df0ad))
* **ci:** :art: relases script ([2e906bc](https://github.com/leifermendez/bot-whatsapp/commit/2e906bce79f7d854d437334e1d0c2cd270b0bbc6))
* **ci:** update ci ([e5a9db7](https://github.com/leifermendez/bot-whatsapp/commit/e5a9db7e12340c4f5baa66e8b20585b63daa3bcf))
* **cli:** create-starter ([3977987](https://github.com/leifermendez/bot-whatsapp/commit/397798790ef5857ca758b0df8384c6a4bfacc181))
* **provider:** :fire: add twilii (weoking) ([4350dff](https://github.com/leifermendez/bot-whatsapp/commit/4350dff22a7de69ba6d35ecbdd67e59b810bd46f))
* **provider:** added twilio provider ([8dd3be9](https://github.com/leifermendez/bot-whatsapp/commit/8dd3be909b36717f6b54e141a5f48d2722d4855c))
* **release:** added ([1988948](https://github.com/leifermendez/bot-whatsapp/commit/1988948c30d922beb7b83faab96d1d59cf7f5f90))
* **release:** added ([f4ad704](https://github.com/leifermendez/bot-whatsapp/commit/f4ad7040abf619635480c30babd6f1159c7af85a))
### Bug Fixes
* **adapter:** conflict resolution ([4b307ef](https://github.com/leifermendez/bot-whatsapp/commit/4b307efe79c738a5c4e04ff1c07ca247d827593c))
* **adapter:** corrections are made to the adapter ([afa6771](https://github.com/leifermendez/bot-whatsapp/commit/afa677190392d48715930ebe2b1e15c7619d730f))
* **bot:** :zap: added delay promises ([73caf09](https://github.com/leifermendez/bot-whatsapp/commit/73caf090ba9013132e5dcb7761a10939dc9ac300))
* **bot:** :zap: fix sensitive case ([24ac9fb](https://github.com/leifermendez/bot-whatsapp/commit/24ac9fbf48f80eeb521a36bc938af3a70dd82303))
* **bot:** :zap: flow improvement + add utils ([a7b19d9](https://github.com/leifermendez/bot-whatsapp/commit/a7b19d9bff5ea66ff888555c3df37ae0e20b612a))
* **bot:** update ([49698bf](https://github.com/leifermendez/bot-whatsapp/commit/49698bfda9d2a53f7b1a7e1724a796698601fbaa))
* **ci:** :zap: balance version ([ec46cfd](https://github.com/leifermendez/bot-whatsapp/commit/ec46cfdd657c08c8e90261613f00cfc080f1e1d6))
* **ci:** :zap: github action ([b827a0a](https://github.com/leifermendez/bot-whatsapp/commit/b827a0ab225b89bb8117c82628db0679c09b4102))
* **ci:** :zap: github action ([4142ca4](https://github.com/leifermendez/bot-whatsapp/commit/4142ca4fd552e7005f3b1397a76b90a2e574d19d))
* **ci:** :zap: github action ([091544a](https://github.com/leifermendez/bot-whatsapp/commit/091544ac3fac0c16925e856e1aec64bcad0ecf6d))
* **ci:** :zap: github action ([2ce342a](https://github.com/leifermendez/bot-whatsapp/commit/2ce342a0cb15019d5084ca06dc30e342b030ea10))
* **ci:** :zap: github action ([7817793](https://github.com/leifermendez/bot-whatsapp/commit/781779328f93ef8b0e6e0f85c6cd05ae782112fb))
* **ci:** :zap: github action ([dfced8c](https://github.com/leifermendez/bot-whatsapp/commit/dfced8c594e9175c81e837af359631ba055b7e1a))
* **ci:** :zap: github action ([aaa4ce8](https://github.com/leifermendez/bot-whatsapp/commit/aaa4ce837229fd51e274de3d91e1d9d615ac69fd))
* **ci:** :zap: github action ([9ddf144](https://github.com/leifermendez/bot-whatsapp/commit/9ddf144244cd6877e7d26f576387814459f2befb))
* **ci:** :zap: github action ([b465de5](https://github.com/leifermendez/bot-whatsapp/commit/b465de55a0e511213d1a7760a74efa102172c85e))
* **ci:** :zap: github action ([cf1dc6f](https://github.com/leifermendez/bot-whatsapp/commit/cf1dc6fac810545e5a2b63f31f71322f37329e38))
* **ci:** :zap: github action ([8d897f8](https://github.com/leifermendez/bot-whatsapp/commit/8d897f824e27a55ca011163092a813a7e8f426af))
* **ci:** ci ([f55cfae](https://github.com/leifermendez/bot-whatsapp/commit/f55cfae6e4ccc1df949212999406680020d27f9c))
* **ci:** ci ([671c5b3](https://github.com/leifermendez/bot-whatsapp/commit/671c5b37f33360e8cb754625b8dd6e83bce9014d))
* **cli:** :bug: path ([32212fb](https://github.com/leifermendez/bot-whatsapp/commit/32212fb52d206bf6f8d753a86d9ce40aa0db2a5d))
* **cli:** :fire: create script - templates ([2319db3](https://github.com/leifermendez/bot-whatsapp/commit/2319db3009501fe57ae21e60ad286eb68c46f4fd))
* **cli:** :fire: create script - templates ([9cb98b5](https://github.com/leifermendez/bot-whatsapp/commit/9cb98b5e73fca3c3f5e70a8497badc31e494b943))
* **cli:** :fire: create script - templates ([2999e0e](https://github.com/leifermendez/bot-whatsapp/commit/2999e0e753f31a8b9e6d7c117e78cdb5656e203a))
* **cli:** :fire: create script - templates ([af716b7](https://github.com/leifermendez/bot-whatsapp/commit/af716b75372899877a81b528b58278376166d0ad))
* **cli:** :fire: create script - templates ([c6999c8](https://github.com/leifermendez/bot-whatsapp/commit/c6999c84931083a87b5717db58003be68244707e))
* **cli:** :fire: create script - templates ([d4b49a9](https://github.com/leifermendez/bot-whatsapp/commit/d4b49a9bd7085070f0c5964d2903f10b71bde0b3))
* **cli:** :fire: create script - templates ([eebc3c9](https://github.com/leifermendez/bot-whatsapp/commit/eebc3c980638d88f11a0d93b8344f3ff345c7ee5))
* **cli:** :zap: clean eslinter ([bfb69d9](https://github.com/leifermendez/bot-whatsapp/commit/bfb69d9a9574a757ae02748b6c5f5afa3eac68e6))
* **cli:** :zap: clean eslinter ([15f6972](https://github.com/leifermendez/bot-whatsapp/commit/15f697225775a0f0e0a440cd980f7fb8f51a1056))
* **cli:** :zap: create-starter ([d3b8310](https://github.com/leifermendez/bot-whatsapp/commit/d3b8310180d2ad813733b1d18f2c32d7d947740a))
* **cli:** :zap: update cli copy ([7797c2b](https://github.com/leifermendez/bot-whatsapp/commit/7797c2b46133697e2a591adab2b67e66b34a1cfe))
* **fix:** fix ([6483545](https://github.com/leifermendez/bot-whatsapp/commit/648354500b123f20044f5ac2e8a26b15f16d1b8d))
* **fix:** fix ([28c0480](https://github.com/leifermendez/bot-whatsapp/commit/28c0480b8bfa6b24394095f57c36ef89c9aeb566))
* **linter:** update linter and commitlint ([70a94ab](https://github.com/leifermendez/bot-whatsapp/commit/70a94ab2c6f8e4122780c77bc3a621944883e621))
* pre-copy fix ([08e2552](https://github.com/leifermendez/bot-whatsapp/commit/08e2552907c48cfeaac843457a18bf2032e6f8aa))
* pre-copy fix ([6617107](https://github.com/leifermendez/bot-whatsapp/commit/6617107ab824215c449e26eae6c2bb327ecfc092))
* **starter:** pre-copy fix ([929e74c](https://github.com/leifermendez/bot-whatsapp/commit/929e74c84b667ec13cb5490b3b951cb8df15ebd1))
* (💍) Is justa test! ([37d04e9](https://github.com/leifermendez/bot-whatsapp/commit/37d04e9e89d3f01fdc367654ba60fb11ab2614c4))
## 0.2.0-alpha.0 (2022-12-01)

View File

@@ -4,10 +4,10 @@
__Requerimientos:__
- Node v16 o superior __[descargar node](https://nodejs.org/es/download/)__
- __[Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable)__ como gestor de paquetes. En el link conseguiras las intrucciones para instalar yarn.
- __[VSCode](https://code.visualstudio.com/download)__ (recomendado): Editor de codigo con plugins
- __[Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits&ssr=false#overview)__ (plugin-vscode) este plugin te ayudara a crear commit semantico.
- Se usara la rama __dev__ *(https://github.com/leifermendez/bot-whatsapp/tree/dev)* como rama principal hasta que se haga oficialmente el lanzamiento de la V2
- __[Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable)__ como gestor de paquetes. En el link conseguirás las intrucciones para instalar yarn.
- __[VSCode](https://code.visualstudio.com/download)__ (recomendado): Editor de código con plugins.
- __[Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits&ssr=false#overview)__ (plugin-vscode) este plugin te ayudará a crear commit semántico.
- Se usará la rama __dev__ *(https://github.com/leifermendez/bot-whatsapp/tree/dev)* como rama principal hasta que se haga oficialmente el lanzamiento de la V2.
### 🚀 Iniciando
@@ -22,14 +22,14 @@ yarn install
```
__Compilar (build)__
Para compilar la aplicación es necesario ejecutar, eso te genera dentro de packages del monorepo un directorio `lib`
Para compilar la aplicación es necesario ejecutar este comando, el cual genera un directorio `lib` dentro de los paquetes del monorepo.
```
yarn build
```
__Example-app__
Se ejecuta el CLI (Command Line Interface) para ayudarte a crear un app-bot de ejemplo
Se ejecuta el CLI (Command Line Interface) para ayudarte a crear un app-bot de ejemplo.
```
yarn run cli
```
@@ -42,15 +42,16 @@ npm run pre-copy
npm start
```
__Commit y Push__
El proyecto tiene implementado __[husky](https://typicode.github.io/husky/#/)__ es una herramienta que dispara unas acciones al momento de hacer commit y hacer push
### __Commit y Push__
__commit:__ Los commit son semanticos esto quiere decir que deben cumplir un standar al momento de escribirlos ejemplo ` feat(adapter): new adapter myqsl ` puede ver más info sobre esto __[aquí](https://github.com/conventional-changelog/commitlint/#what-is-commitlint)__
El proyecto tiene implementado __[husky](https://typicode.github.io/husky/#/)__, es una herramienta que dispara unas acciones al momento de hacer commit y hacer push.
__push:__ Cada push ejecutar `yarn run test` el cual ejecuta los test internos que tienen que cumplir con __95% de cobertura__.
__commit:__ Los commit son semánticos, esto quiere decir que deben cumplir un standar al momento de escribirlos ejemplo: ` feat(adapter): new adapter myqsl ` puede ver más info sobre esto __[aquí](https://github.com/conventional-changelog/commitlint/#what-is-commitlint)__
__push:__ Cada push ejecutar `yarn run test` el cual realiza los test internos que tienen que cumplir con __95% de cobertura__.
> Documento en constaten actualización....
> Documento en constante actualización....
------
- [Discord](https://link.codigoencasa.com/DISCORD)

View File

@@ -4,7 +4,7 @@
🦊 Documentación: [https://bot-whatsapp.pages.dev/](https://bot-whatsapp.pages.dev/)
Video como hacer PR: https://youtu.be/Lxt8Acob6aU
- [ ] Evitar dependencias
🚀 __Roadmap:__ [https://github.com/users/leifermendez/projects/4/views/1](https://github.com/users/leifermendez/projects/4/views/1)
**Comunidad**

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/root",
"version": "0.2.0-alpha.0",
"version": "0.1.2",
"description": "Bot de wahtsapp open source para MVP o pequeños negocios",
"main": "app.js",
"private": true,
@@ -29,7 +29,7 @@
"prepare": "npx husky install",
"preinstall": "npx only-allow yarn",
"postinstall": "npx prettier --write .",
"release": "standard-version"
"release": "standard-version -- --prerelease"
},
"workspaces": [
"packages/create-bot-whatsapp",

View File

@@ -34,16 +34,16 @@ class CoreClass {
listenerBusEvents = () => [
{
event: 'preinit',
func: () => printer('Iniciando provider espere...'),
func: () => printer('Iniciando proveedor, espere...'),
},
{
event: 'require_action',
func: ({ instructions, title = '⚡⚡ ACCION REQUERIDA ⚡⚡' }) =>
func: ({ instructions, title = '⚡⚡ ACCIÓN REQUERIDA ⚡⚡' }) =>
printer(instructions, title),
},
{
event: 'ready',
func: () => printer('Provider conectado y listo'),
func: () => printer('Proveedor conectado y listo'),
},
{
event: 'auth_failure',

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/bot",
"version": "0.0.4-alpha.0",
"version": "0.0.21-alpha.0",
"description": "",
"main": "./lib/bundle.bot.cjs",
"scripts": {

View File

@@ -12,20 +12,20 @@ const checkNodeVersion = () => {
)
process.exit(1)
}
console.log(green(`Node.js combatible ${version}`))
console.log(green(`Node.js compatible ${version}`))
console.log(``)
}
const checkOs = () => {
console.log(bgCyan('🙂 Revisando tu Sistema Operativo'))
console.log(bgCyan('🙂 Revisando tu sistema operativo'))
const os = process.platform
if (!os.includes('win32')) {
const messages = [
`El sistema operativo actual (${os}) posiblemente requiera`,
`una confiuración adicional referente al puppeter`,
`una configuración adicional referente al puppeteer`,
``,
`Recuerda pasar por el WIKI`,
`🔗 https://github.com/leifermendez/bot-whatsapp/wiki/Instalaci%C3%B3n`,
`🔗 https://github.com/leifermendez/bot-whatsapp/wiki/Instalación`,
``,
]

View File

@@ -12,9 +12,13 @@ const copyFiles = async (from, to) => {
}
}
const copyBaseApp = async () => {
const BASEP_APP_PATH_FROM = `${process.cwd()}/starters/apps/base`
const BASEP_APP_PATH_TO = `${process.cwd()}/example-app-base`
/**
* Copiar directorio con archivos
* @param {*} templateName
*/
const copyBaseApp = async (fromDir = process.cwd(), toDir = process.cwd()) => {
const BASEP_APP_PATH_FROM = `${fromDir}`
const BASEP_APP_PATH_TO = `${toDir}`
await copyFiles(BASEP_APP_PATH_FROM, BASEP_APP_PATH_TO)
}

View File

@@ -14,7 +14,7 @@ const getPkgManage = async () => {
}
const installDeps = (pkgManager, packageList) => {
const errorMessage = `Ocurrio un error instalando ${packageList}`
const errorMessage = `Ocurrió un error instalando ${packageList}`
let childProcess = []
const installSingle = (pkgInstall) => () => {

View File

@@ -1,54 +1,59 @@
const prompts = require('prompts')
const { yellow, red } = require('kleur')
const { installAll } = require('../install')
const { cleanSession } = require('../clean')
const { yellow, red, cyan, bgMagenta } = require('kleur')
const { copyBaseApp } = require('../create-app')
const { join } = require('path')
const { existsSync } = require('fs')
const { checkNodeVersion, checkOs } = require('../check')
const { jsonConfig } = require('../configuration')
const bannerDone = () => {
console.log(``)
console.log(
cyan(
[
`[Agradecimientos]: Este es un proyecto OpenSource, si tienes intenciones de colaborar puedes hacerlo:`,
`[😉] Comprando un cafe https://www.buymeacoffee.com/leifermendez`,
`[⭐] Dar estrella https://github.com/leifermendez/bot-whatsapp`,
`[🚀] Realizando mejoras en el codigo`,
].join('\n')
)
)
console.log(``)
}
const startInteractive = async () => {
const questions = [
{
type: 'text',
name: 'exampeOpt',
message:
'Quieres crear una app de ejemplo "example-app-example"? (Y/n)',
},
// {
// type: 'text',
// name: 'dependencies',
// message:
// 'Quieres actualizar las librerias "whatsapp-web.js"? (Y/n)',
// },
{
type: 'text',
name: 'cleanTmp',
message: 'Quieres limpiar la session del bot? (Y/n)',
name: 'outDir',
message: 'Quieres crear un bot? (Y/n)',
},
{
type: 'multiselect',
name: 'providerWs',
message: 'Proveedor de Whatsapp',
message: '¿Cuál proveedor de whatsapp quieres utilizar?',
choices: [
{ title: 'whatsapp-web.js', value: 'whatsapp-web.js' },
{ title: 'whatsapp-web.js (gratis)', value: 'wweb' },
{ title: 'Twilio', value: 'twilio' },
{ title: 'Venom (gratis)', value: 'venom' },
{ title: 'Baileys (gratis)', value: 'bailey', disabled: true },
{ title: 'API Oficial (Meta)', value: 'meta', disabled: true },
{ title: 'Twilio', value: 'twilio', disabled: true },
],
max: 1,
hint: 'Espacio para selecionar',
hint: 'Espacio para seleccionar',
instructions: '↑/↓',
},
{
type: 'multiselect',
name: 'providerDb',
message: 'Cual base de datos quieres usar',
message: '¿Cuál base de datos quieres utilizar?',
choices: [
{ title: 'JSONFile', value: 'json' },
{ title: 'MySQL', value: 'mysql', disabled: true },
{ title: 'Mongo', value: 'mongo', disabled: true },
{ title: 'Memory', value: 'memory' },
{ title: 'Mongo', value: 'mongo' },
{ title: 'MySQL', value: 'mysql' },
{ title: 'Json', value: 'json', disabled: true },
],
max: 1,
hint: 'Espacio para selecionar',
hint: 'Espacio para seleccionar',
instructions: '↑/↓',
},
]
@@ -57,90 +62,78 @@ const startInteractive = async () => {
checkNodeVersion()
checkOs()
const onCancel = () => {
console.log('Proceso cancelado!')
console.log('¡Proceso cancelado!')
return true
}
const response = await prompts(questions, { onCancel })
const {
dependencies = '',
cleanTmp = '',
exampeOpt = '',
providerDb = [],
providerWs = [],
} = response
/**
* Question
* @returns
*/
const installOrUdpateDep = async () => {
const answer = dependencies.toLowerCase() || 'n'
const { outDir = '', providerDb = [], providerWs = [] } = response
const createApp = async (templateName = null) => {
if (!templateName)
throw new Error('TEMPLATE_NAME_INVALID: ', templateName)
const possiblesPath = [
join(__dirname, '..', '..', 'starters', 'apps', templateName),
join(__dirname, '..', 'starters', 'apps', templateName),
join(__dirname, 'starters', 'apps', templateName),
]
const answer = outDir.toLowerCase() || 'n'
if (answer.includes('n')) return true
if (answer.includes('y')) {
await installAll()
return true
const indexOfPath = possiblesPath.find((a) => existsSync(a))
await copyBaseApp(indexOfPath, join(process.cwd(), templateName))
console.log(``)
console.log(bgMagenta(`⚡⚡⚡INSTRUCCIONES⚡⚡⚡`))
console.log(yellow(`cd ${templateName}`))
console.log(yellow(`npm install`))
console.log(yellow(`npm start`))
console.log(``)
return outDir
}
}
/**
* Question
* Selccionar Provider (meta, twilio, etc...)
* @returns
*/
const cleanAllSession = async () => {
const answer = cleanTmp.toLowerCase() || 'n'
if (answer.includes('n')) return true
if (answer.includes('y')) {
await cleanSession()
return true
}
}
const createApp = async () => {
const answer = exampeOpt.toLowerCase() || 'n'
if (answer.includes('n')) return true
if (answer.includes('y')) {
await copyBaseApp()
return true
}
}
const vendorProvider = async () => {
const [answer] = providerWs
if (!providerWs.length) {
console.log(
red(
`Debes de seleccionar una WS Provider. Tecla [Space] para seleccionar`
`Debes seleccionar un proveedor de whatsapp. Tecla [Space] para seleccionar`
)
)
process.exit(1)
}
console.log(yellow(`'Deberia crer una carpeta en root/provider'`))
return true
return answer
}
/**
* Selecionar adaptador de base de datos
* @returns
*/
const dbProvider = async () => {
const answer = providerDb
const [answer] = providerDb
if (!providerDb.length) {
console.log(
red(
`Debes de seleccionar una DB Provider. Tecla [Space] para seleccionar`
`Debes seleccionar un proveedor de base de datos. Tecla [Space] para seleccionar`
)
)
process.exit(1)
}
if (answer === 'json') {
console.log('Deberia crer una carpeta en root/data')
return 1
}
return answer
}
await createApp()
await installOrUdpateDep()
await cleanAllSession()
await vendorProvider()
await dbProvider()
await jsonConfig()
const providerAdapter = await vendorProvider()
const dbAdapter = await dbProvider()
const NAME_DIR = ['base', providerAdapter, dbAdapter].join('-')
await createApp(NAME_DIR)
bannerDone()
}
module.exports = { startInteractive }

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/cli",
"version": "0.0.2-alpha.0",
"version": "0.0.28-alpha.0",
"description": "",
"main": "index.js",
"devDependencies": {
@@ -10,6 +10,7 @@
"kleur": "^4.1.5"
},
"files": [
"./starters/",
"./lib/cli/bundle.cli.cjs"
],
"bin": {

View File

@@ -1,5 +1,6 @@
const banner = require('../../config/banner.rollup.json')
const commonjs = require('@rollup/plugin-commonjs')
const copy = require('rollup-plugin-copy')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const { join } = require('path')
@@ -12,5 +13,11 @@ module.exports = {
file: PATH,
format: 'cjs',
},
plugins: [commonjs(), nodeResolve()],
plugins: [
copy({
targets: [{ src: 'starters/*', dest: join(__dirname, 'starters') }],
}),
commonjs(),
nodeResolve(),
],
}

2
packages/create-bot-whatsapp/bin/create.js Normal file → Executable file
View File

@@ -1,3 +1,3 @@
#!/usr/bin/env node
const main = require('../lib/bin/bundle.create.cjs')
const main = require('../lib/bundle.create-bot-whatsapp.cjs')
main()

View File

@@ -1,12 +1,10 @@
const { startInteractive } = require('../cli')
/**
* Main function
* Voy a llamar directo a CLI
* Temporalmente luego mejoro esta
* parte
* @returns
*/
const main = () => {
console.clear()
console.log(``)
console.log(`[PostInstall]: Este es el main function.`)
console.log(`[PostInstall]: 👌 Aqui podrias instalar cosas`)
console.log(``)
}
const main = () => startInteractive()
module.exports = main

View File

@@ -1,12 +1,15 @@
{
"name": "create-bot-whatsapp",
"version": "0.0.9-alpha.0",
"version": "0.0.39-alpha.0",
"description": "",
"main": "./lib/bin/bundle.create.cjs",
"main": "./lib/bundle.create-bot-whatsapp.cjs",
"files": [
"./starters/",
"./bin/create.js",
"./lib/bundle.create-bot-whatsapp.cjs"
],
"bin": "./bin/create.js",
"dependencies": {
"@bot-whatsapp/cli": "*"
},
"bin": {
"bot": "./lib/bin/bundle.create.cjs"
}
}

View File

@@ -1,9 +1,10 @@
const banner = require('../../config/banner.rollup.json')
const commonjs = require('@rollup/plugin-commonjs')
const copy = require('rollup-plugin-copy')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const { join } = require('path')
const PATH = join(__dirname, 'lib', 'bin', 'bundle.create.cjs')
const PATH = join(__dirname, 'lib', 'bundle.create-bot-whatsapp.cjs')
module.exports = {
input: join(__dirname, 'index.js'),
@@ -12,5 +13,11 @@ module.exports = {
file: PATH,
format: 'cjs',
},
plugins: [commonjs(), nodeResolve()],
plugins: [
copy({
targets: [{ src: 'starters/*', dest: join(__dirname, 'starters') }],
}),
commonjs(),
nodeResolve(),
],
}

View File

@@ -1,11 +1,14 @@
{
"name": "@bot-whatsapp/database",
"version": "0.0.2-alpha.0",
"version": "0.0.20-alpha.0",
"description": "Esto es el conector a mysql, pg, mongo",
"main": "./lib/mock/index.cjs",
"keywords": [],
"author": "",
"license": "ISC",
"files": [
"./lib/"
],
"dependencies": {
"dotenv": "^16.0.3",
"mongodb": "^4.11.0",

View File

@@ -4,143 +4,228 @@ import type { DocumentHead } from '@builder.io/qwik-city'
export default component$(() => {
return (
<>
<h1>Welcome to BotWhatsapp Docs Starter</h1>
<h1>Bienvenido</h1>
<p>
Un robot (bot) de Whatsapp es un programa que reconoce palabras
clave en los mensajes que entran, y contesta con respuestas
pre-programadas, facilitando así el dar información a posibles
clientes desde tu cuenta de Whatsapp automáticamente.
</p>
<p>
Este bot esta programado en Javascript y usa NodeJS y es{' '}
<a href="https://www.redhat.com/es/topics/open-source/what-is-open-source">
Open Source
</a>
.
</p>
<p>
Está programado de tal forma que se pueden usar varias librerías
(hasta ahora whatsapp-web.js, twilio y Venom) y se puden agregar
más.
</p>
<p>
Si se quere cambiar la librería que se está usando, esto se
puede hacer con solo cambiar unas lineas en el código.
</p>
<table border>
<thead>
<tr>
<th>Características</th>
<th>Estatus</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menus y Submenus</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>Dialogflow</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>MySQL</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>JSON File</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>QR Scan (route)</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>Easy deploy heroku</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>Buttons</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
<g-emoji
class="g-emoji"
alias="information_source"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png"
>
</g-emoji>{' '}
(No funciona en multi-device)
</td>
</tr>
<tr>
<td>Send Voice Note</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
<tr>
<td>Add support ubuntu/linux</td>
<td>
<g-emoji
class="g-emoji"
alias="white_check_mark"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png"
>
</g-emoji>
</td>
</tr>
</tbody>
</table>
<h2>Requisitos</h2>
<ul>
<li>This homepage uses a layout without a menu.</li>
<li>Node v14 o superior</li>
<li>
<span>The </span>
<a href="/docs">Documentation</a>
<span>
{' '}
pages use multiple nested layouts, one of them providing
a left menu.
</span>
VSCode (Editor de codigo){' '}
<a
href="https://code.visualstudio.com/download"
rel="nofollow"
>
Descargar
</a>
</li>
<li>
Check out the <code>src/routes</code> directory to get
started.
MySql (opcional) solo aplica si vas a usar el modo 'mysql'{' '}
<a href="https://github.com/leifermendez/bot-whatsapp/blob/main/sql-bot.sql">
sql-bot.sql migración
</a>
</li>
<li>
Add integrations with <code>npm run qwik add</code>.
</li>
<li>
More info about development in <code>README.md</code>
</li>
<li>
<a href="/docs">Qwik City</a>
<span> is the meta-framework for Qwik</span>
Dialogflow (opcional) solo aplica si vas a usar el modo
'dialogflow'
</li>
</ul>
<h2>Commands</h2>
<table class="commands">
<tr>
<td>
<code>npm run dev</code>
</td>
<td>Start the dev server and watch for changes.</td>
</tr>
<tr>
<td>
<code>npm run preview</code>
</td>
<td>Production build and start preview server.</td>
</tr>
<tr>
<td>
<code>npm run build</code>
</td>
<td>Production build.</td>
</tr>
<tr>
<td>
<code>npm run qwik add</code>
</td>
<td>Select an integration to add.</td>
</tr>
</table>
<h2>Add Integrations</h2>
<table class="commands">
<tr>
<td>
<code>npm run qwik add cloudflare-pages</code>
</td>
<td>
<a
href="https://developers.cloudflare.com/pages"
target="_blank"
>
Cloudflare Pages Server
</a>
</td>
</tr>
<tr>
<td>
<code>npm run qwik add express</code>
</td>
<td>
<a href="https://expressjs.com/" target="_blank">
Nodejs Express Server
</a>
</td>
</tr>
<tr>
<td>
<code>npm run qwik add netlify-edge</code>
</td>
<td>
<a href="https://docs.netlify.com/" target="_blank">
Netlify Edge Functions
</a>
</td>
</tr>
<tr>
<td>
<code>npm run qwik add static</code>
</td>
<td>
<a
href="https://qwik.builder.io/qwikcity/static-site-generation/overview/"
target="_blank"
>
Static Site Generation (SSG)
</a>
</td>
</tr>
</table>
<h2>Community</h2>
<h2>Instalación</h2>
<ul>
<li>
<span>Questions or just want to say hi? </span>
<a href="https://qwik.builder.io/chat" target="_blank">
Chat on discord!
</a>
Abre VSCode y muevete al directorio en donde queres insralar
el bot.
</li>
<li>Ejecuta este comando: npm create bot-whatsapp@latest</li>
<li>Contesta que SI queres crear un bot nuevo (Y)</li>
<li>
Selecciona con las flechas (arriba y abajo) la librería que
quieres usar para el bot, cuando estes sobre la opción que
quieres, oprime la barra de espacio y luego la tecla "Enter"
</li>
<li>
<span>Follow </span>
<a href="https://twitter.com/QwikDev" target="_blank">
@QwikDev
</a>
<span> on Twitter</span>
De igual forma selecciona la base de daros que quieres usar.
</li>
<li>
<span>Open issues and contribute on </span>
<a href="https://github.com/BuilderIO/qwik" target="_blank">
GitHub
</a>
Cambiate al directorio que se creo dependiendo de la base de
datos que hayas seleccionado, si seleccionaste "Memory"
sería "cd base-wweb-memory"
</li>
<li>
<span>Watch </span>
<a href="https://qwik.builder.io/media/" target="_blank">
Presentations, Podcasts, Videos, etc.
</a>
Ya estando en el nuevo subdirectorio, ejecuta el comando
"npm install" y espera a que se instalen las dependencias.
</li>
<li>
Una vez que termine la instalación ejecuta el comando "npm
start"y espera a que te mande el mensaje de que necesitas
escanear el código QR, para esto ve al directorio en el que
se instaló y busca el archivo "qr.svg" y abrelo, te debe de
mostrsr un código QR que tienes que escanear en el Whatsapp
que quieres ligar con el bot, para esto ve a tu Whatsapp,
haz clic en los tres botones de arriba a la derecha y entra
en "Linked devices", y luego en el botón que dice "LINK
DEVICE", esto va a abrir la camara para que escanes el
código.
</li>
<li>
Una vez ligado el Whatsapp vas a ver el mensaje de
"Proveedor conectado y listo".
</li>
<li>
Desde OTRO celular mandas un mensaje al numero del Whatsapp
que acabas de ligar al bot con la palabra "Hola" y LISTO.
</li>
<li>Debes de recibir una respuesta automática del bot.</li>
</ul>
</>
)

View File

@@ -1,11 +1,14 @@
{
"name": "@bot-whatsapp/provider",
"version": "0.0.7-alpha.0",
"version": "0.0.26-alpha.0",
"description": "Esto es el conector a Twilio, Meta, etc...",
"main": "./lib/mock/index.cjs",
"keywords": [],
"author": "",
"license": "ISC",
"files": [
"./lib/"
],
"dependencies": {
"@bot-whatsapp/bot": "*",
"qr-image": "^3.2.0"
@@ -13,6 +16,8 @@
"exports": {
"./mock": "./lib/mock/index.cjs",
"./twilio": "./lib/twilio/index.cjs",
"./web-whatsapp": "./lib/web-whatsapp/index.cjs"
"./web-whatsapp": "./lib/web-whatsapp/index.cjs",
"./venom": "./lib/venom/index.cjs",
"./baileys": "./lib/baileys/index.cjs"
}
}

View File

@@ -30,4 +30,22 @@ module.exports = [
},
plugins: [commonjs()],
},
{
input: join(__dirname, 'src', 'venom', 'index.js'),
output: {
banner: banner['banner.output'].join(''),
file: join(__dirname, 'lib', 'venom', 'index.cjs'),
format: 'cjs',
},
plugins: [commonjs()],
},
{
input: join(__dirname, 'src', 'baileys', 'index.js'),
output: {
banner: banner['banner.output'].join(''),
file: join(__dirname, 'lib', 'baileys', 'index.cjs'),
format: 'cjs',
},
plugins: [commonjs()],
},
]

View File

@@ -0,0 +1,171 @@
const { ProviderClass } = require('@bot-whatsapp/bot')
const pino = require('pino')
const {
default: makeWASocket,
useMultiFileAuthState,
} = require('@adiwajshing/baileys')
const {
baileyGenerateImage,
baileyCleanNumber,
baileyIsValidNumber,
} = require('./utils')
/**
* ⚙️ BaileysProvider: Es una clase tipo adaptor
* que extiende clases de ProviderClass (la cual es como interfaz para sber que funciones rqueridas)
* https://github.com/adiwajshing/Baileys
*/
class BaileysProvider extends ProviderClass {
vendor
constructor() {
super()
this.initBailey().then(() => this.initBusEvents())
}
/**
* Iniciar todo Bailey
*/
async initBailey() {
const { state, saveCreds } = await useMultiFileAuthState('sessions')
try {
this.vendor = makeWASocket({
printQRInTerminal: false,
auth: state,
logger: pino({ level: 'error' }),
})
this.vendor.ev.on(
'connection.update',
async ({ qr, connection, lastDisconnect }) => {
if (qr) baileyGenerateImage(qr)
if (connection === 'open') this.emit('ready', true)
if (lastDisconnect?.error) {
saveCreds()
this.initBailey()
}
}
)
} catch (e) {
this.emit('error', e)
}
}
/**
* Mapeamos los eventos nativos a los que la clase Provider espera
* para tener un standar de eventos
* @returns
*/
busEvents = () => [
{
event: 'connection.update',
func: async ({ qr, connection, lastDisconnect }) => {
if (qr) {
this.emit('require_action', {
instructions: [
`Debes escanear el QR Code para iniciar session reivsa qr.png`,
`Recuerda que el QR se actualiza cada minuto `,
`Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
],
})
baileyGenerateImage(qr)
}
if (lastDisconnect?.error) {
this.emit('require_action', {
instructions: [
`Algo sucedio reinicia el bot o revisa tu whatsapp`,
`Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
],
})
}
if (connection === 'open') this.emit('ready', true)
},
},
{
event: 'messages.upsert',
func: ({ messages }) => {
const [messageCtx] = messages
let payload = {
...messageCtx,
body: messageCtx?.message?.conversation,
from: messageCtx?.key?.remoteJid,
}
if (payload.from === 'status@broadcast') {
return
}
if (!baileyIsValidNumber(payload.from)) {
return
}
payload.from = baileyCleanNumber(payload.from, true)
this.emit('message', payload)
},
},
]
initBusEvents = () => {
const listEvents = this.busEvents()
for (const { event, func } of listEvents) {
this.vendor.ev.on(event, func)
}
}
/**
* @alpha
* @param {string} number
* @param {string} message
* @example await sendMessage('+XXXXXXXXXXX', 'https://dominio.com/imagen.jpg' | 'img/imagen.jpg')
*/
sendMedia = async (number, imageUrl) => {
await this.vendor.sendMessage(number, {
image: { url: imageUrl },
})
}
/**
* @alpha
* @param {string} number
* @param {string} message
* @param {boolean} voiceNote optional
* @example await sendMessage('+XXXXXXXXXXX', 'audio.mp3')
*/
sendAudio = async (number, audioUrl, voiceNote = false) => {
const numberClean = number.replace('+', '')
await this.vendor.sendMessage(`${numberClean}@c.us`, {
audio: { url: audioUrl },
ptt: voiceNote,
})
}
/**
*
* @param {string} number
* @param {string} message
* @returns
*/
sendText = async (number, message) => {
return this.vendor.sendMessage(number, { text: message })
}
/**
* TODO: Necesita terminar de implementar el sendMedia y sendButton guiarse:
* https://github.com/leifermendez/bot-whatsapp/blob/4e0fcbd8347f8a430adb43351b5415098a5d10df/packages/provider/src/web-whatsapp/index.js#L165
* @param {string} number
* @param {string} message
* @example await sendMessage('+XXXXXXXXXXX', 'Hello World')
*/
sendMessage = async (numberIn, message, { options }) => {
const number = baileyCleanNumber(numberIn)
// if (options?.buttons?.length)
// return this.sendButtons(number, message, options.buttons)
if (options?.media) return this.sendMedia(number, options.media)
return this.sendText(number, message)
}
}
module.exports = BaileysProvider

View File

@@ -0,0 +1,21 @@
const { createWriteStream } = require('fs')
const qr = require('qr-image')
const baileyCleanNumber = (number, full = false) => {
number = number.replace('@s.whatsapp.net', '')
number = !full ? `${number}@s.whatsapp.net` : `${number}`
return number
}
const baileyGenerateImage = (base64) => {
let qr_svg = qr.image(base64, { type: 'png', margin: 4 })
qr_svg.pipe(createWriteStream(`${process.cwd()}/qr.png`))
}
const baileyIsValidNumber = (rawNumber) => {
const regexGroup = /\@g.us\b/gm
const exist = rawNumber.match(regexGroup)
return !exist
}
module.exports = { baileyCleanNumber, baileyGenerateImage, baileyIsValidNumber }

View File

@@ -0,0 +1,116 @@
const { ProviderClass } = require('@bot-whatsapp/bot')
const venom = require('venom-bot')
const {
venomCleanNumber,
venomGenerateImage,
venomisValidNumber,
} = require('./utils')
/**
* ⚙️ VenomProvider: Es una clase tipo adaptor
* que extiende clases de ProviderClass (la cual es como interfaz para sber que funciones rqueridas)
* https://github.com/orkestral/venom
*/
class VenomProvider extends ProviderClass {
vendor
constructor() {
super()
this.init().then(() => this.initBusEvents())
}
/**
* Iniciamos el Proveedor Venom
*/
init = async () => {
try {
const client = await venom.create(
{
session: 'session-base',
multidevice: true,
},
(base) => this.generateQr(base),
undefined,
{ logQR: false }
)
this.vendor = client
} catch (e) {
this.emit('auth_failure', {
instructions: [
`Ocurrio un error con la inicializacion de venom`,
`Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
`(Puedes abrir un ISSUE) https://github.com/leifermendez/bot-whatsapp/issues/new/choose`,
``,
`${e?.message}`,
],
})
}
}
/**
* Generamos QR Code pra escanear con el Whatsapp
*/
generateQr = (qr) => {
console.clear()
this.emit('require_action', {
instructions: [
`Debes escanear el QR Code para iniciar session reivsa qr.png`,
`Recuerda que el QR se actualiza cada minuto `,
`Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
],
})
venomGenerateImage(qr)
}
/**
* Mapeamos los eventos nativos de https://docs.orkestral.io/venom/#/?id=events
* para tener un standar de eventos
* @returns
*/
busEvents = () => [
{
event: 'onMessage',
func: (payload) => {
if (payload.from === 'status@broadcast') {
return
}
if (!venomisValidNumber(payload.from)) {
return
}
payload.from = venomCleanNumber(payload.from, true)
this.emit('message', payload)
},
},
]
/**
* Iniciamos y mapeamos el BusEvent
* Ejemplo:
* this.vendor.onMessage() 👉 this.vendor["onMessage"]()
*/
initBusEvents = () => {
const listEvents = this.busEvents()
for (const { event, func } of listEvents) {
if (this.vendor[event])
this.vendor[event]((payload) => func(payload))
}
}
/**
* Enviar mensaje al usuario
* @param {*} userId
* @param {*} message
* @param {*} param2
* @returns
*/
sendMessage = async (userId, message, { options }) => {
const number = venomCleanNumber(userId)
if (options?.buttons?.length)
return this.sendButtons(number, message, options.buttons)
if (options?.media) return this.sendMedia(number, options.media)
return this.vendor.sendText(number, message)
}
}
module.exports = VenomProvider

View File

@@ -0,0 +1,36 @@
const { writeFile } = require('fs')
const venomCleanNumber = (number, full = false) => {
number = number.replace('@c.us', '')
number = !full ? `${number}@c.us` : `${number}`
return number
}
const venomGenerateImage = (base) => {
const matches = base.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/)
if (matches.length !== 3) {
return new Error('Invalid input string')
}
let response = {}
response.type = matches[1]
response.data = new Buffer.from(matches[2], 'base64')
var imageBuffer = response
writeFile(
`${process.cwd()}/qr.png`,
imageBuffer['data'],
'binary',
(err) => {
if (err != null) throw new Error('ERROR_QR_GENERATE')
return
}
)
}
const venomisValidNumber = (rawNumber) => {
const regexGroup = /\@g.us\b/gm
const exist = rawNumber.match(regexGroup)
return !exist
}
module.exports = { venomCleanNumber, venomGenerateImage, venomisValidNumber }

View File

@@ -3,10 +3,10 @@ const { ProviderClass } = require('@bot-whatsapp/bot')
const { Console } = require('console')
const { createWriteStream } = require('fs')
const {
cleanNumber,
generateImage,
isValidNumber,
downloadMedia,
wwebCleanNumber,
wwebDownloadMedia,
wwebGenerateImage,
wwebIsValidNumber,
} = require('./utils')
const logger = new Console({
@@ -31,6 +31,7 @@ class WebWhatsappProvider extends ProviderClass {
for (const { event, func } of listEvents) {
this.vendor.on(event, func)
}
this.vendor.emit('preinit')
this.vendor.initialize().catch((e) => {
logger.log(e)
@@ -59,12 +60,12 @@ class WebWhatsappProvider extends ProviderClass {
func: (qr) => {
this.emit('require_action', {
instructions: [
`Debes escanear el QR Code para iniciar session reivsa qr.svg`,
`Debes escanear el QR Code para iniciar session reivsa qr.png`,
`Recuerda que el QR se actualiza cada minuto `,
`Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
],
})
generateImage(qr)
wwebGenerateImage(qr)
},
},
{
@@ -78,10 +79,10 @@ class WebWhatsappProvider extends ProviderClass {
return
}
if (!isValidNumber(payload.from)) {
if (!wwebIsValidNumber(payload.from)) {
return
}
payload.from = cleanNumber(payload.from, true)
payload.from = wwebCleanNumber(payload.from, true)
this.emit('message', payload)
},
},
@@ -97,7 +98,7 @@ class WebWhatsappProvider extends ProviderClass {
*/
sendMedia = async (number, mediaInput = null) => {
if (!mediaInput) throw new Error(`NO_SE_ENCONTRO: ${mediaInput}`)
const fileDownloaded = await downloadMedia(mediaInput)
const fileDownloaded = await wwebDownloadMedia(mediaInput)
const media = MessageMedia.fromFilePath(fileDownloaded)
return this.vendor.sendMessage(number, media, {
sendAudioAsVoice: true,
@@ -162,7 +163,7 @@ class WebWhatsappProvider extends ProviderClass {
* @returns
*/
sendMessage = async (userId, message, { options }) => {
const number = cleanNumber(userId)
const number = wwebCleanNumber(userId)
if (options?.buttons?.length)
return this.sendButtons(number, message, options.buttons)
if (options?.media) return this.sendMedia(number, options.media)

View File

@@ -4,18 +4,18 @@ const { tmpdir } = require('os')
const http = require('http')
const https = require('https')
const cleanNumber = (number, full = false) => {
const wwebCleanNumber = (number, full = false) => {
number = number.replace('@c.us', '')
number = !full ? `${number}@c.us` : `${number}`
return number
}
const generateImage = (base64) => {
let qr_svg = qr.image(base64, { type: 'svg', margin: 4 })
qr_svg.pipe(createWriteStream(`${process.cwd()}/qr.svg`))
const wwebGenerateImage = (base64) => {
let qr_svg = qr.image(base64, { type: 'png', margin: 4 })
qr_svg.pipe(createWriteStream(`${process.cwd()}/qr.png`))
}
const isValidNumber = (rawNumber) => {
const wwebIsValidNumber = (rawNumber) => {
const regexGroup = /\@g.us\b/gm
const exist = rawNumber.match(regexGroup)
return !exist
@@ -27,7 +27,7 @@ const isValidNumber = (rawNumber) => {
* @param {*} url
* @returns
*/
const downloadMedia = (url) => {
const wwebDownloadMedia = (url) => {
return new Promise((resolve, reject) => {
const ext = url.split('.').pop()
const checkProtocol = url.includes('https:')
@@ -50,4 +50,9 @@ const downloadMedia = (url) => {
})
}
module.exports = { cleanNumber, generateImage, isValidNumber, downloadMedia }
module.exports = {
wwebCleanNumber,
wwebGenerateImage,
wwebIsValidNumber,
wwebDownloadMedia,
}

View File

@@ -15,4 +15,4 @@ Promise.all([
copyLibPkg('bot', appDir),
copyLibPkg('database', appDir),
copyLibPkg('provider', appDir),
]).then(() => console.log('Todas las lib copiadas'))
]).then(() => console.log('Todas las librerías copiadas'))

View File

@@ -82,6 +82,35 @@ const updateVersion = async (packageName = null, number = null) => {
return { version: newVersion }
}
/**
* Revisar si la version nueva existe o no en npmjs
* @param {*} packageName
* @param {*} version
* @returns
*/
const checkExistVersion = async (packageName = null, version = null) => {
try {
const pkgJson = join(PATH_PACKAGES, packageName)
const pkgJsonObject = readPackage(packageName)
const { stdout } = await cmd(
NPM_COMMAND,
['view', `${pkgJsonObject.name}@${version}`],
{
stdio: 'inherit',
cwd: pkgJson,
}
)
return true
} catch (e) {
return false
}
}
/**
* Empaquetar
* @param {*} packageName
* @returns
*/
const packRelease = async (packageName) => {
const pkgJson = join(PATH_PACKAGES, packageName)
const { stdout } = await cmd(NPM_COMMAND, ['pack'], {
@@ -91,6 +120,12 @@ const packRelease = async (packageName) => {
return stdout
}
/**
* Lanzar release
* @param {*} packageName
* @param {*} latest
* @returns
*/
const publishRelease = async (packageName, latest = null) => {
const args = !latest ? ['--tag', 'dev'] : ['--access', 'public']
const pkgJson = join(PATH_PACKAGES, packageName)
@@ -106,15 +141,24 @@ const publishRelease = async (packageName, latest = null) => {
* Recibe los argumentos entrantes
*/
/**
* Init
*/
const main = async () => {
if (PKG_ARG) {
let EXIST_VERSION = true
const tokenNpm = NPM_TOKEN ? NPM_TOKEN.split('=').at(1) : null
const pkgName = PKG_ARG ? PKG_ARG.split('=').at(1) : null
const pkgNumber = PKG_ARG_VERSION
? PKG_ARG_VERSION.split('=').at(1)
: null
if (tokenNpm) await npmToken(tokenNpm)
await updateVersion(pkgName, pkgNumber)
while (EXIST_VERSION) {
const { version } = await updateVersion(pkgName, pkgNumber)
EXIST_VERSION = await checkExistVersion(pkgName, version)
console.log(`[${pkgName} - Version]: `, version, EXIST_VERSION)
}
await packRelease(pkgName)
await publishRelease(pkgName, pkgNumber)
}

View File

@@ -13,30 +13,58 @@ const MockAdapter = require('@bot-whatsapp/database/mock')
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'HOLA'])
.addAnswer('Bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer('Escribe zapatos o bolsos')
.addAnswer(
'esperando respuesta...',
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
@@ -44,7 +72,6 @@ const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-twilio-memory",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -1,9 +1,9 @@
### BASIC APP
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
![](https://i.imgur.com/0z0G91w.png)
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)

View File

@@ -0,0 +1,82 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
addChild,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')
/**
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-twilio-mongo",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,82 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
addChild,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')
/**
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-twilio-mysql",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -5,7 +5,7 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const WebWhatsappProvider = require('@bot-whatsapp/provider/venom')
const MockAdapter = require('@bot-whatsapp/database/mock')
const flowPrincipal = addKeyword(['hola', 'ole', 'HOLA'])

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-venom-memory",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"venom-bot": "^4.3.7",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,28 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/venom')
const MockAdapter = require('@bot-whatsapp/database/mock')
const flowPrincipal = addKeyword(['hola', 'ole', 'HOLA'])
.addAnswer('Bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-venom-mongo",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"venom-bot": "^4.3.7",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,28 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/venom')
const MockAdapter = require('@bot-whatsapp/database/mock')
const flowPrincipal = addKeyword(['hola', 'ole', 'HOLA'])
.addAnswer('Bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-venom-mysql",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"venom-bot": "^4.3.7",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,82 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
addChild,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')
/**
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-wweb-memory",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,82 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
addChild,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')
/**
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-wweb-mongo",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,12 @@
### BASE APP
Este bot contiene un flujo basico en el cual una persona (cliente) escribe **"hola"** y el bot responde.
- Bienvenido a mi tienda
- Como puedo ayudarte?
- Tengo: Zapatos Bolsos etc..
------
- [Discord](https://link.codigoencasa.com/DISCORD)
- [Twitter](https://twitter.com/leifermendez)
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
- [Telegram](https://t.me/leifermendez)

View File

@@ -0,0 +1,82 @@
const {
createBot,
createProvider,
createFlow,
addKeyword,
addChild,
} = require('@bot-whatsapp/bot')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')
/**
* Declarando flujo hijo
*/
const flowBolsos2 = addKeyword(['bolsos2', '2'])
.addAnswer('🤯 *MUCHOS* bolsos ...')
.addAnswer('y mas bolsos... bla bla')
const flowZapatos2 = addKeyword(['zapatos2', '2'])
.addAnswer('🤯 repito que tengo *MUCHOS* zapatos.')
.addAnswer('y algunas otras cosas.')
const flowZapatos = addKeyword(['zapatos', 'ZAPATOS'])
.addAnswer('🤯 Veo que elegiste zapatos')
.addAnswer('Tengo muchos zapatos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*zapatos2*', 'para mas información'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowZapatos2)]
)
const flowBolsos = addKeyword(['bolsos', 'BOLSOS'])
.addAnswer('🙌 Veo que elegiste bolsos')
.addAnswer('Tengo muchos bolsos...bla bla')
.addAnswer(
['Manda:', '*2*', 'o', '*bolsos2*', 'para mas información.'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
},
[...addChild(flowBolsos2)]
)
/**
* Declarando flujo principal
*/
const flowPrincipal = addKeyword(['hola', 'ole', 'alo'])
.addAnswer('Hola, bienvenido a mi tienda')
.addAnswer('Como puedo ayudarte?')
.addAnswer(['Tengo:', 'Zapatos', 'Bolsos', 'etc..'])
.addAnswer(
['Para continuar escribe:', '*Zapatos*', 'o', '*Bolsos*'],
{ capture: true },
(ctx) => {
console.log('Aqui puedes ver más info del usuario...')
console.log('Puedes enviar un mail, hook, etc..')
console.log(ctx)
console.log(ctx['_data']['notifyName'])
},
[...addChild(flowBolsos), ...addChild(flowZapatos)]
)
const main = async () => {
const adapterDB = new MockAdapter()
const adapterFlow = createFlow([flowPrincipal])
const adapterProvider = createProvider(WebWhatsappProvider)
createBot({
flow: adapterFlow,
provider: adapterProvider,
database: adapterDB,
})
}
main()

View File

@@ -0,0 +1,20 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib base-wweb-mysql",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3",
"@bot-whatsapp/bot": "latest",
"@bot-whatsapp/cli": "latest",
"@bot-whatsapp/database": "latest",
"@bot-whatsapp/provider": "latest"
},
"author": "",
"license": "ISC"
}

View File

@@ -1,16 +0,0 @@
{
"name": "bot-whatsapp-base",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib example-app-base",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3"
},
"author": "",
"license": "ISC"
}

View File

@@ -1,16 +0,0 @@
{
"name": "bot-whatsapp-basic",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"pre-copy": "cd .. && yarn run copy.lib example-app-basic",
"start": "node app.js"
},
"keywords": [],
"dependencies": {
"whatsapp-web.js": "^1.18.3"
},
"author": "",
"license": "ISC"
}

1736
yarn.lock

File diff suppressed because it is too large Load Diff