mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
fix(cli): 🔥 update instructions
This commit is contained in:
14
.vscode/bot.code-snippets
vendored
14
.vscode/bot.code-snippets
vendored
@@ -4,11 +4,9 @@
|
|||||||
"prefix": "bot:flow",
|
"prefix": "bot:flow",
|
||||||
"description": "Crear un flujo simple",
|
"description": "Crear un flujo simple",
|
||||||
"body": [
|
"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('Hola! 🚀 Bienvenido a este CHATBOT')",
|
||||||
" .addAnswer('¿Como puedo ayudarte?', {",
|
" .addAnswer('¿Como puedo ayudarte?')"
|
||||||
" delay: 1500",
|
|
||||||
"})"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Flow Bot (completo)": {
|
"Flow Bot (completo)": {
|
||||||
@@ -16,10 +14,10 @@
|
|||||||
"prefix": "bot:flow completo",
|
"prefix": "bot:flow completo",
|
||||||
"description": "Crear un flujo completo",
|
"description": "Crear un flujo completo",
|
||||||
"body": [
|
"body": [
|
||||||
"export const ${1:${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}}Flow = addKeyword(['hola', 'buenas'])",
|
"export const flow${1} = addKeyword(['categorias'])",
|
||||||
" .addAnswer('Hola! 🚀 Bienvenido a este CHATBOT')",
|
" .addAnswer('⚡ Tenemos las siguientes categorias')",
|
||||||
" .addAnswer('¿Como puedo ayudarte?', {",
|
" .addAnswer(['🚀 Computadoras', '🚀 Celulares', '🚀 Otros'], {",
|
||||||
" delay: 1500",
|
" delay: 1500, //Milisegundo 1500 = 1.5segundos",
|
||||||
"})"
|
"})"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,13 +34,8 @@ Se ejecuta el CLI (Command Line Interface) para ayudarte a crear un app-bot de e
|
|||||||
yarn run cli
|
yarn run cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Abrir carpeta __example-app-base__ y ejecutar
|
__Seguir instrucciones__
|
||||||
```
|

|
||||||
cd example-app-base
|
|
||||||
npm i
|
|
||||||
npm run pre-copy
|
|
||||||
npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
### __Commit y Push__
|
### __Commit y Push__
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const bannerDone = () => {
|
|||||||
[
|
[
|
||||||
`[Agradecimientos]: Este es un proyecto OpenSource, si tienes intenciones de colaborar puedes hacerlo:`,
|
`[Agradecimientos]: Este es un proyecto OpenSource, si tienes intenciones de colaborar puedes hacerlo:`,
|
||||||
`[😉] Comprando un cafe https://www.buymeacoffee.com/leifermendez`,
|
`[😉] 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`,
|
`[🚀] Realizando mejoras en el codigo`,
|
||||||
].join('\n')
|
].join('\n')
|
||||||
)
|
)
|
||||||
@@ -85,7 +85,7 @@ const startInteractive = async () => {
|
|||||||
const indexOfPath = possiblesPath.find((a) => existsSync(a))
|
const indexOfPath = possiblesPath.find((a) => existsSync(a))
|
||||||
await copyBaseApp(indexOfPath, join(process.cwd(), templateName))
|
await copyBaseApp(indexOfPath, join(process.cwd(), templateName))
|
||||||
console.log(``)
|
console.log(``)
|
||||||
console.log(bgMagenta(`⚡⚡⚡INSTRUCCIONES⚡⚡⚡`))
|
console.log(bgMagenta(`⚡⚡⚡ INSTRUCCIONES ⚡⚡⚡`))
|
||||||
console.log(yellow(`cd ${templateName}`))
|
console.log(yellow(`cd ${templateName}`))
|
||||||
console.log(yellow(`npm install`))
|
console.log(yellow(`npm install`))
|
||||||
console.log(yellow(`npm start`))
|
console.log(yellow(`npm start`))
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
"./mock": "./lib/mock/index.cjs",
|
"./mock": "./lib/mock/index.cjs",
|
||||||
"./mongo": "./lib/mongo/index.cjs",
|
"./mongo": "./lib/mongo/index.cjs",
|
||||||
"./json-file": "./lib/json-file/index.cjs",
|
"./json": "./lib/json/index.cjs",
|
||||||
"./mysql": "./lib/mysql/index.cjs"
|
"./mysql": "./lib/mysql/index.cjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ module.exports = [
|
|||||||
plugins: [commonjs()],
|
plugins: [commonjs()],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: join(__dirname, 'src', 'json-file', 'index.js'),
|
input: join(__dirname, 'src', 'json', 'index.js'),
|
||||||
output: {
|
output: {
|
||||||
banner: banner['banner.output'].join(''),
|
banner: banner['banner.output'].join(''),
|
||||||
file: join(__dirname, 'lib', 'json-file', 'index.cjs'),
|
file: join(__dirname, 'lib', 'json', 'index.cjs'),
|
||||||
},
|
},
|
||||||
plugins: [commonjs()],
|
plugins: [commonjs()],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
const path = require('path')
|
|
||||||
const StormDB = require('stormdb')
|
const StormDB = require('stormdb')
|
||||||
const engine = new StormDB.localFileEngine(
|
const { join } = require('path')
|
||||||
path.join(process.cwd(), './db.stormdb')
|
|
||||||
)
|
const engine = new StormDB.localFileEngine(join(process.cwd(), './db.stormdb'))
|
||||||
|
|
||||||
class JsonFileAdapter {
|
class JsonFileAdapter {
|
||||||
db
|
db
|
||||||
Reference in New Issue
Block a user