forked from codigoencasa/builderbot
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): 🔥 added new provider in the cli
Excelente trabajo ⚡
- Loading branch information
Showing
13 changed files
with
572 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### CHATBOT Whatsapp (Baileys Provider) | ||
|
||
<p align="center"> | ||
<img width="300" src="https://i.imgur.com/Oauef6t.png"> | ||
</p> | ||
|
||
|
||
**Con esta librería, puedes construir flujos automatizados de conversación de manera agnóstica al proveedor de WhatsApp,** configurar respuestas automatizadas para preguntas frecuentes, recibir y responder mensajes de manera automatizada, y hacer un seguimiento de las interacciones con los clientes. Además, puedes configurar fácilmente disparadores que te ayudaran a expandir las funcionalidades sin límites. **[Ver documentación](https://bot-whatsapp.netlify.app/)** | ||
|
||
|
||
``` | ||
npm install | ||
npm start | ||
``` | ||
|
||
--- | ||
## Recursos | ||
- [📄 Documentación](https://bot-whatsapp.netlify.app/) | ||
- [🚀 Roadmap](https://github.com/orgs/codigoencasa/projects/1) | ||
- [💻 Discord](https://link.codigoencasa.com/DISCORD) | ||
- [👌 Twitter](https://twitter.com/leifermendez) | ||
- [🎥 Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
const { createBot, createProvider, createFlow, addKeyword } = require('@bot-whatsapp/bot') | ||
|
||
const QRPortalWeb = require('@bot-whatsapp/portal') | ||
const WPPConnectProviderClass = require('@bot-whatsapp/provider/wppconnect') | ||
const JsonFileAdapter = require('@bot-whatsapp/database/json') | ||
|
||
const flowSecundario = addKeyword(['2', 'siguiente']).addAnswer(['📄 Aquí tenemos el flujo secundario']) | ||
|
||
const flowDocs = addKeyword(['doc', 'documentacion', 'documentación']).addAnswer( | ||
[ | ||
'📄 Aquí encontras las documentación recuerda que puedes mejorarla', | ||
'https://bot-whatsapp.netlify.app/', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowTuto = addKeyword(['tutorial', 'tuto']).addAnswer( | ||
[ | ||
'🙌 Aquí encontras un ejemplo rapido', | ||
'https://bot-whatsapp.netlify.app/docs/example/', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowGracias = addKeyword(['gracias', 'grac']).addAnswer( | ||
[ | ||
'🚀 Puedes aportar tu granito de arena a este proyecto', | ||
'[*opencollective*] https://opencollective.com/bot-whatsapp', | ||
'[*buymeacoffee*] https://www.buymeacoffee.com/leifermendez', | ||
'[*patreon*] https://www.patreon.com/leifermendez', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowDiscord = addKeyword(['discord']).addAnswer( | ||
['🤪 Únete al discord', 'https://link.codigoencasa.com/DISCORD', '\n*2* Para siguiente paso.'], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowPrincipal = addKeyword(['hola', 'ole', 'alo']) | ||
.addAnswer('🙌 Hola bienvenido a este *Chatbot*') | ||
.addAnswer( | ||
[ | ||
'te comparto los siguientes links de interes sobre el proyecto', | ||
'👉 *doc* para ver la documentación', | ||
'👉 *gracias* para ver la lista de videos', | ||
'👉 *discord* unirte al discord', | ||
], | ||
null, | ||
null, | ||
[flowDocs, flowGracias, flowTuto, flowDiscord] | ||
) | ||
|
||
const main = async () => { | ||
const adapterDB = new JsonFileAdapter() | ||
const adapterFlow = createFlow([flowPrincipal]) | ||
const adapterProvider = createProvider(WPPConnectProviderClass) | ||
|
||
createBot({ | ||
flow: adapterFlow, | ||
provider: adapterProvider, | ||
database: adapterDB, | ||
}) | ||
|
||
QRPortalWeb() | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "base-bailey-memory", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"keywords": [], | ||
"dependencies": { | ||
"@bot-whatsapp/bot": "latest", | ||
"@bot-whatsapp/cli": "latest", | ||
"@bot-whatsapp/database": "latest", | ||
"@bot-whatsapp/portal": "latest", | ||
"@bot-whatsapp/provider": "latest", | ||
"@wppconnect-team/wppconnect": "1.22.0", | ||
"mime-types": "2.1.35" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### CHATBOT Whatsapp (Baileys Provider) | ||
|
||
<p align="center"> | ||
<img width="300" src="https://i.imgur.com/Oauef6t.png"> | ||
</p> | ||
|
||
|
||
**Con esta librería, puedes construir flujos automatizados de conversación de manera agnóstica al proveedor de WhatsApp,** configurar respuestas automatizadas para preguntas frecuentes, recibir y responder mensajes de manera automatizada, y hacer un seguimiento de las interacciones con los clientes. Además, puedes configurar fácilmente disparadores que te ayudaran a expandir las funcionalidades sin límites. **[Ver documentación](https://bot-whatsapp.netlify.app/)** | ||
|
||
|
||
``` | ||
npm install | ||
npm start | ||
``` | ||
|
||
--- | ||
## Recursos | ||
- [📄 Documentación](https://bot-whatsapp.netlify.app/) | ||
- [🚀 Roadmap](https://github.com/orgs/codigoencasa/projects/1) | ||
- [💻 Discord](https://link.codigoencasa.com/DISCORD) | ||
- [👌 Twitter](https://twitter.com/leifermendez) | ||
- [🎥 Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
const { createBot, createProvider, createFlow, addKeyword } = require('@bot-whatsapp/bot') | ||
|
||
const QRPortalWeb = require('@bot-whatsapp/portal') | ||
const WPPConnectProviderClass = require('@bot-whatsapp/provider/wppconnect') | ||
const MockAdapter = require('@bot-whatsapp/database/mock') | ||
|
||
const flowSecundario = addKeyword(['2', 'siguiente']).addAnswer(['📄 Aquí tenemos el flujo secundario']) | ||
|
||
const flowDocs = addKeyword(['doc', 'documentacion', 'documentación']).addAnswer( | ||
[ | ||
'📄 Aquí encontras las documentación recuerda que puedes mejorarla', | ||
'https://bot-whatsapp.netlify.app/', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowTuto = addKeyword(['tutorial', 'tuto']).addAnswer( | ||
[ | ||
'🙌 Aquí encontras un ejemplo rapido', | ||
'https://bot-whatsapp.netlify.app/docs/example/', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowGracias = addKeyword(['gracias', 'grac']).addAnswer( | ||
[ | ||
'🚀 Puedes aportar tu granito de arena a este proyecto', | ||
'[*opencollective*] https://opencollective.com/bot-whatsapp', | ||
'[*buymeacoffee*] https://www.buymeacoffee.com/leifermendez', | ||
'[*patreon*] https://www.patreon.com/leifermendez', | ||
'\n*2* Para siguiente paso.', | ||
], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowDiscord = addKeyword(['discord']).addAnswer( | ||
['🤪 Únete al discord', 'https://link.codigoencasa.com/DISCORD', '\n*2* Para siguiente paso.'], | ||
null, | ||
null, | ||
[flowSecundario] | ||
) | ||
|
||
const flowPrincipal = addKeyword(['hola', 'ole', 'alo']) | ||
.addAnswer('🙌 Hola bienvenido a este *Chatbot*') | ||
.addAnswer( | ||
[ | ||
'te comparto los siguientes links de interes sobre el proyecto', | ||
'👉 *doc* para ver la documentación', | ||
'👉 *gracias* para ver la lista de videos', | ||
'👉 *discord* unirte al discord', | ||
], | ||
null, | ||
null, | ||
[flowDocs, flowGracias, flowTuto, flowDiscord] | ||
) | ||
|
||
const main = async () => { | ||
const adapterDB = new MockAdapter() | ||
const adapterFlow = createFlow([flowPrincipal]) | ||
const adapterProvider = createProvider(WPPConnectProviderClass) | ||
|
||
createBot({ | ||
flow: adapterFlow, | ||
provider: adapterProvider, | ||
database: adapterDB, | ||
}) | ||
|
||
QRPortalWeb() | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "base-bailey-memory", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"keywords": [], | ||
"dependencies": { | ||
"@bot-whatsapp/bot": "latest", | ||
"@bot-whatsapp/cli": "latest", | ||
"@bot-whatsapp/database": "latest", | ||
"@bot-whatsapp/portal": "latest", | ||
"@bot-whatsapp/provider": "latest", | ||
"@wppconnect-team/wppconnect": "1.22.0", | ||
"mime-types": "2.1.35" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
### CHATBOT Whatsapp (Baileys Provider) | ||
|
||
<p align="center"> | ||
<img width="300" src="https://i.imgur.com/Oauef6t.png"> | ||
</p> | ||
|
||
|
||
**Con esta librería, puedes construir flujos automatizados de conversación de manera agnóstica al proveedor de WhatsApp,** configurar respuestas automatizadas para preguntas frecuentes, recibir y responder mensajes de manera automatizada, y hacer un seguimiento de las interacciones con los clientes. Además, puedes configurar fácilmente disparadores que te ayudaran a expandir las funcionalidades sin límites. **[Ver más informacion](https://bot-whatsapp.netlify.app/)** | ||
|
||
```js | ||
const main = async () => { | ||
const adapterDB = new MockAdapter() | ||
const adapterFlow = createFlow([flowPrincipal]) | ||
|
||
const adapterProvider = createProvider(BaileysProvider, { | ||
accountSid: process.env.ACC_SID, | ||
authToken: process.env.ACC_TOKEN, | ||
vendorNumber: process.env.ACC_VENDOR, | ||
}) | ||
|
||
createBot({ | ||
flow: adapterFlow, | ||
provider: adapterProvider, | ||
database: adapterDB, | ||
}) | ||
} | ||
``` | ||
|
||
``` | ||
npm install | ||
npm start | ||
``` | ||
|
||
--- | ||
## Recursos | ||
- [📄 Documentación](https://bot-whatsapp.netlify.app/) | ||
- [🚀 Roadmap](https://github.com/orgs/codigoencasa/projects/1) | ||
- [💻 Discord](https://link.codigoencasa.com/DISCORD) | ||
- [👌 Twitter](https://twitter.com/leifermendez) | ||
- [🎥 Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR) |
Oops, something went wrong.