diff --git a/.vscode/bot.code-snippets b/.vscode/bot.code-snippets index 951f52e02..062383f5b 100644 --- a/.vscode/bot.code-snippets +++ b/.vscode/bot.code-snippets @@ -4,11 +4,9 @@ "prefix": "bot:flow", "description": "Crear un flujo simple", "body": [ - "export const ${1:${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}}Flow = addKeyword(['hola', 'buenas'])", + "export const flow${1} = addKeyword(['hola', 'buenas'])", " .addAnswer('Hola! 🚀 Bienvenido a este CHATBOT')", - " .addAnswer('¿Como puedo ayudarte?', {", - " delay: 1500", - "})" + " .addAnswer('¿Como puedo ayudarte?')" ] }, "Flow Bot (completo)": { @@ -16,10 +14,10 @@ "prefix": "bot:flow completo", "description": "Crear un flujo completo", "body": [ - "export const ${1:${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}}Flow = addKeyword(['hola', 'buenas'])", - " .addAnswer('Hola! 🚀 Bienvenido a este CHATBOT')", - " .addAnswer('¿Como puedo ayudarte?', {", - " delay: 1500", + "export const flow${1} = addKeyword(['categorias'])", + " .addAnswer('⚡ Tenemos las siguientes categorias')", + " .addAnswer(['🚀 Computadoras', '🚀 Celulares', '🚀 Otros'], {", + " delay: 1500, //Milisegundo 1500 = 1.5segundos", "})" ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3afc3f96a..33f98f32f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,13 +34,8 @@ Se ejecuta el CLI (Command Line Interface) para ayudarte a crear un app-bot de e yarn run cli ``` -Abrir carpeta __example-app-base__ y ejecutar -``` -cd example-app-base -npm i -npm run pre-copy -npm start -``` +__Seguir instrucciones__ +![](https://i.imgur.com/dC6lEwy.png) ### __Commit y Push__ diff --git a/packages/cli/interactive/index.js b/packages/cli/interactive/index.js index f7360cea1..3dc16c494 100644 --- a/packages/cli/interactive/index.js +++ b/packages/cli/interactive/index.js @@ -12,7 +12,7 @@ const bannerDone = () => { [ `[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`, + `[⭐] Dar estrella https://github.com/codigoencasa/bot-whatsapp`, `[🚀] Realizando mejoras en el codigo`, ].join('\n') ) @@ -85,7 +85,7 @@ const startInteractive = async () => { const indexOfPath = possiblesPath.find((a) => existsSync(a)) await copyBaseApp(indexOfPath, join(process.cwd(), templateName)) console.log(``) - console.log(bgMagenta(`⚡⚡⚡INSTRUCCIONES⚡⚡⚡`)) + console.log(bgMagenta(`⚡⚡⚡ INSTRUCCIONES ⚡⚡⚡`)) console.log(yellow(`cd ${templateName}`)) console.log(yellow(`npm install`)) console.log(yellow(`npm start`)) diff --git a/packages/database/package.json b/packages/database/package.json index 1184abddd..cfe467d29 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -18,7 +18,7 @@ "exports": { "./mock": "./lib/mock/index.cjs", "./mongo": "./lib/mongo/index.cjs", - "./json-file": "./lib/json-file/index.cjs", + "./json": "./lib/json/index.cjs", "./mysql": "./lib/mysql/index.cjs" } } diff --git a/packages/database/rollup-database.config.js b/packages/database/rollup-database.config.js index 1eecdbae2..844d41408 100644 --- a/packages/database/rollup-database.config.js +++ b/packages/database/rollup-database.config.js @@ -31,10 +31,10 @@ module.exports = [ plugins: [commonjs()], }, { - input: join(__dirname, 'src', 'json-file', 'index.js'), + input: join(__dirname, 'src', 'json', 'index.js'), output: { banner: banner['banner.output'].join(''), - file: join(__dirname, 'lib', 'json-file', 'index.cjs'), + file: join(__dirname, 'lib', 'json', 'index.cjs'), }, plugins: [commonjs()], }, diff --git a/packages/database/src/json-file/index.js b/packages/database/src/json/index.js similarity index 88% rename from packages/database/src/json-file/index.js rename to packages/database/src/json/index.js index af53df8e8..7aa8029e7 100644 --- a/packages/database/src/json-file/index.js +++ b/packages/database/src/json/index.js @@ -1,8 +1,7 @@ -const path = require('path') const StormDB = require('stormdb') -const engine = new StormDB.localFileEngine( - path.join(process.cwd(), './db.stormdb') -) +const { join } = require('path') + +const engine = new StormDB.localFileEngine(join(process.cwd(), './db.stormdb')) class JsonFileAdapter { db