forked from codigoencasa/builderbot
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): 🔥 create script - templates
- Loading branch information
1 parent
1036273
commit eebc3c9
Showing
29 changed files
with
417 additions
and
61 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
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
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 |
---|---|---|
@@ -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() |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
const { startInteractive } = require('@bot-whatsapp/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 |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
{ | ||
"name": "create-bot-whatsapp", | ||
"version": "0.0.9-alpha.0", | ||
"version": "0.0.13-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" | ||
} | ||
} |
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
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,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) |
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,28 @@ | ||
const { | ||
createBot, | ||
createProvider, | ||
createFlow, | ||
addKeyword, | ||
} = require('@bot-whatsapp/bot') | ||
|
||
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp') | ||
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() |
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,16 @@ | ||
{ | ||
"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" | ||
} |
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,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) |
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,28 @@ | ||
const { | ||
createBot, | ||
createProvider, | ||
createFlow, | ||
addKeyword, | ||
} = require('@bot-whatsapp/bot') | ||
|
||
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp') | ||
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() |
Oops, something went wrong.