Skip to content

Commit 4943710

Browse files
committed
docs: meta
1 parent 16fe230 commit 4943710

File tree

31 files changed

+412
-189
lines changed

31 files changed

+412
-189
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
"starters",
1111
"conflict",
1212
"contexts"
13+
],
14+
"cSpell.words": [
15+
"dialogflow",
16+
"wppconnect"
1317
]
1418
}

TODO.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@
4747
- [x] remove space number
4848
- [x] que se puedae escribir a el mismo
4949
- [x] mysql port
50-
- [ ] meta image, media, audio
50+
- [x] Cambiar todos los mensajes a ingles
51+
- [x] meta image, media, audio
5152
- [ ] coverage
5253
- [ ] flowDynamic({media...})
53-
- [ ] elmintar vendor de handleCTX
5454
- [ ] test meta
5555
- [ ] try catch error http
5656
- [ ] test twilio
57-
- [ ] Cambiar todos los mensajes a ingles
57+
- [ ] Cambiar readme de los mono proyectos
58+
- [ ] meta recuerda activar los dos webhooks
5859
- [ ] cambiar el CONTRIBUTING.md
5960
- [ ] cambiar mensajes a ingles
6061
- [ ] state get('detail.name')

packages/bot/README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
# `bot-ts`
1+
<p align="center">
2+
<a href="https://builderbot.vercel.app/">
3+
<h2 align="center">@builderbot/bot</h2>
4+
</a>
5+
</p>
26

3-
> TODO: description
47

5-
## Usage
8+
## Documentation
69

7-
```
8-
const botTs = require('bot-ts');
10+
Visit [builderbot](https://builderbot.vercel.app/) to view the full documentation.
911

10-
// TODO: DEMONSTRATE API
11-
```
12+
13+
## Official Course
14+
15+
If you want to discover all the functions and features offered by the library you can take the course.
16+
[View Course](https://app.codigoencasa.com/courses/builderbot?refCode=LEIFER)
17+
18+
19+
## Contact Us
20+
- [💻 Discord](https://link.codigoencasa.com/DISCORD)
21+
- [👌 𝕏 (Twitter)](https://twitter.com/leifermendez)

packages/cli/README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
# @builderbot/cli
1+
<p align="center">
2+
<a href="https://builderbot.vercel.app/">
3+
<h2 align="center">@builderbot/cli</h2>
4+
</a>
5+
</p>
26

3-
- [x] Revisar version de NODE
4-
- [x] Revisar OS
5-
- [x] Obtener Package Manager
6-
- [x] Revisar las libreria de WhatsappWeb para obtener version reciente
7-
- [x] Opcion interactiva de limpiar session
8-
- [x] Opcion de generar `json` con la configuracion
9-
- [x] Agregar `rollup` para limpiar el codigo
107

11-
---
8+
## Documentation
129

13-
**Comunidad**
10+
Visit [builderbot](https://builderbot.vercel.app/) to view the full documentation.
1411

15-
> Forma parte de este proyecto.
1612

17-
- [Discord](https://link.codigoencasa.com/DISCORD)
18-
- [Twitter](https://twitter.com/leifermendez)
19-
- [Youtube](https://www.youtube.com/watch?v=5lEMCeWEJ8o&list=PL_WGMLcL4jzWPhdhcUyhbFU6bC0oJd2BR)
20-
- [Telegram](https://t.me/leifermendez)
13+
## Official Course
14+
15+
If you want to discover all the functions and features offered by the library you can take the course.
16+
[View Course](https://app.codigoencasa.com/courses/builderbot?refCode=LEIFER)
17+
18+
19+
## Contact Us
20+
- [💻 Discord](https://link.codigoencasa.com/DISCORD)
21+
- [👌 𝕏 (Twitter)](https://twitter.com/leifermendez)

packages/cli/src/configuration/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export interface ValueLabel {
1717
}
1818

1919
export const PROVIDER_LIST: Provider[] = [
20-
{ value: 'baileys', label: 'Baileys', hint: 'gratis' },
21-
{ value: 'venom', label: 'Venom', hint: 'gratis' },
22-
{ value: 'wppconnect', label: 'WPPConnect', hint: 'gratis' },
23-
// { value: 'wweb', label: 'Whatsapp-web.js', hint: 'gratis' },
20+
{ value: 'baileys', label: 'Baileys', hint: 'opensource' },
21+
{ value: 'venom', label: 'Venom', hint: 'opensource' },
22+
{ value: 'wppconnect', label: 'WPPConnect', hint: 'opensource' },
23+
// { value: 'wweb', label: 'Whatsapp-web.js', hint: 'opensource' },
2424
{ value: 'twilio', label: 'Twilio' },
2525
{ value: 'meta', label: 'Meta' },
2626
]

packages/cli/src/interactive-legacy/index.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const bannerDone = (): void => {
2323
console.log(
2424
color.cyan(
2525
[
26-
`[Agradecimientos]: Este es un proyecto OpenSource, si tienes intenciones de colaborar puedes hacerlo:`,
27-
`[😉] Comprando un cafe https://www.buymeacoffee.com/leifermendez`,
28-
`[⭐] Dar estrella https://github.com/codigoencasa/bot-whatsapp`,
29-
`[🚀] Realizando mejoras en el codigo`,
26+
`[Acknowledgements]: This is an OpenSource project, if you intend to collaborate you can do so:`,
27+
`[😉] Buying a coffee https://www.buymeacoffee.com/leifermendez`,
28+
`[⭐] Giving a star https://github.com/codigoencasa/bot-whatsapp`,
29+
`[🚀] Making improvements in the code`,
3030
].join('\n')
3131
)
3232
)
@@ -42,8 +42,8 @@ const startInteractiveLegacy = async (): Promise<void> => {
4242
console.clear()
4343
await nextSteps()
4444
} catch (e) {
45-
console.error(color.bgRed(`Ups! 🙄 algo no va bien.`))
46-
console.error(color.bgRed(`Revisa los requerimientos minimos en la documentacion`))
45+
console.error(color.bgRed(`Oops! 🙄 something is not right.`))
46+
console.error(color.bgRed(`Check the minimum requirements in the documentation`))
4747
}
4848
}
4949

@@ -52,30 +52,30 @@ const nextSteps = async (): Promise<void> => {
5252
{
5353
type: 'text',
5454
name: 'outDir',
55-
message: 'Quieres crear un bot? (Y/n)',
55+
message: 'Do you want to create a bot? (Y/n)',
5656
},
5757
{
5858
type: 'multiselect',
5959
name: 'providerWs',
60-
message: '¿Cuál proveedor de whatsapp quieres utilizar?',
60+
message: 'Which WhatsApp provider do you want to use?',
6161
choices: PROVIDER_LIST.map((c: ProviderChoice) => ({ title: c.label, value: c.value })),
6262
max: 1,
63-
hint: 'Espacio para seleccionar',
63+
hint: 'Space to select',
6464
instructions: '↑/↓',
6565
},
6666
{
6767
type: 'multiselect',
6868
name: 'providerDb',
69-
message: '¿Cuál base de datos quieres utilizar?',
69+
message: 'Which database do you want to use?',
7070
choices: PROVIDER_DATA.map((c: ProviderChoice) => ({ title: c.label, value: c.value })),
7171
max: 1,
72-
hint: 'Espacio para seleccionar',
72+
hint: 'Space to select',
7373
instructions: '↑/↓',
7474
},
7575
]
7676

7777
const onCancel = (): boolean => {
78-
console.log('¡Proceso cancelado!')
78+
console.log('Process canceled!')
7979
return true
8080
}
8181
const response: Response = await prompts(questions, { onCancel })
@@ -98,7 +98,7 @@ const nextSteps = async (): Promise<void> => {
9898
if (!indexOfPath) throw new Error('Path does not exist: ' + indexOfPath)
9999
await copyBaseApp(indexOfPath, join(process.cwd(), templateName))
100100
console.log(``)
101-
console.log(color.bgMagenta(`⚡⚡⚡ INSTRUCCIONES ⚡⚡⚡`))
101+
console.log(color.bgMagenta(`⚡⚡⚡ INSTRUCTIONS ⚡⚡⚡`))
102102
console.log(color.yellow(`cd ${templateName}`))
103103
console.log(color.yellow(`npm install`))
104104
console.log(color.yellow(`npm start`))
@@ -112,7 +112,7 @@ const nextSteps = async (): Promise<void> => {
112112
const vendorProvider = async (): Promise<string> => {
113113
const [answer] = providerWs
114114
if (!providerWs.length) {
115-
console.log(color.red(`Debes seleccionar un proveedor de whatsapp. Tecla [Space] para seleccionar`))
115+
console.log(color.red(`You must select a WhatsApp provider. Press [Space] to select`))
116116
process.exit(1)
117117
}
118118
return answer
@@ -121,7 +121,7 @@ const nextSteps = async (): Promise<void> => {
121121
const dbProvider = async (): Promise<string> => {
122122
const [answer] = providerDb
123123
if (!providerDb.length) {
124-
console.log(color.red(`Debes seleccionar un proveedor de base de datos. Tecla [Space] para seleccionar`))
124+
console.log(color.red(`You must select a database provider. Press [Space] to select`))
125125
process.exit(1)
126126
}
127127
return answer

packages/cli/src/interactive/index.ts

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,40 @@ const handleLegacyCli = async (): Promise<void> => {
1717
await startInteractiveLegacy()
1818
}
1919

20-
const bannerDone = (templateName: string = ''): void => {
21-
note(
22-
[
23-
color.yellow(` cd ${templateName} `),
24-
color.yellow(` npm install `),
25-
color.yellow(` npm start `),
26-
``,
27-
`📄 Documentation:`,
28-
` https://builderbot.vercel.app`,
29-
``,
30-
`🤖 Issues? Join:`,
31-
` https://link.codigoencasa.com/DISCORD`,
32-
].join('\n'),
33-
'Instructions:'
34-
)
20+
const bannerDone = (templateName: string = '', language: string): void => {
21+
const notes = [color.yellow(` cd ${templateName} `), color.yellow(` npm install `)]
22+
23+
if (language === 'ts') {
24+
notes.push(color.yellow(` npm run dev `))
25+
} else {
26+
notes.push(color.yellow(` npm start `))
27+
}
28+
29+
const doneNote = [
30+
``,
31+
`📄 Documentation:`,
32+
` https://builderbot.vercel.app`,
33+
``,
34+
`🤖 Issues? Join:`,
35+
` https://link.codigoencasa.com/DISCORD`,
36+
]
37+
38+
note([...notes, ...doneNote].join('\n'), 'Instructions:')
3539
}
3640

3741
const systemRequirements = async (): Promise<void> => {
3842
const stepCheckGit: CheckResult = await checkGit()
3943

4044
if (!stepCheckGit.pass) {
4145
note(stepCheckGit.message)
42-
cancel('Operacion cancelada')
46+
cancel('Operation canceled')
4347
return process.exit(0)
4448
}
4549

4650
const stepCheckNode: CheckResult = await checkNodeVersion()
4751
if (!stepCheckNode.pass) {
4852
note(stepCheckNode.message)
49-
cancel('Operacion cancelada')
53+
cancel('Operation canceled')
5054
return process.exit(0)
5155
}
5256
}
@@ -68,67 +72,67 @@ const startInteractive = async (): Promise<void> => {
6872
console.clear()
6973
console.log('')
7074

71-
intro(`Vamos a crear un ${color.bgBlue(' Chatbot ')} ✨`)
75+
intro(` Let's create a ${color.bgCyan(' Chatbot ')} ✨`)
7276

7377
const stepContinue = await confirm({
74-
message: '¿Quieres continuar?',
78+
message: 'Do you want to continue?',
7579
})
7680

7781
if (!stepContinue) {
78-
cancel('Operacion cancelada')
82+
cancel('Operation canceled')
7983
return process.exit(0)
8084
}
8185

8286
if (isCancel(stepContinue)) {
83-
cancel('Operacion cancelada')
87+
cancel('Operation canceled')
8488
return process.exit(0)
8589
}
8690

8791
const stepProvider = await select({
88-
message: '¿Cuál proveedor de whatsapp quieres utilizar?',
92+
message: 'Which WhatsApp provider do you want to use?',
8993
options: PROVIDER_LIST,
9094
})
9195

9296
if (isCancel(stepProvider)) {
93-
cancel('Operacion cancelada')
97+
cancel('Operation canceled')
9498
return process.exit(0)
9599
}
96100

97101
const stepDatabase = await select({
98-
message: '¿Cuál base de datos quieres utilizar?',
102+
message: 'Which database do you want to use?',
99103
options: PROVIDER_DATA,
100104
})
101105

102106
if (isCancel(stepDatabase)) {
103-
cancel('Operacion cancelada')
107+
cancel('Operation canceled')
104108
return process.exit(0)
105109
}
106110

107111
const stepLanguage = await select({
108-
message: '¿Que lenguaje prefieres usar?',
112+
message: 'Which language do you prefer to use?',
109113
options: AVAILABLE_LANGUAGES,
110114
})
111115

112116
if (isCancel(stepLanguage)) {
113-
cancel('Operacion cancelada')
117+
cancel('Operation canceled')
114118
return process.exit(0)
115119
}
116120

117121
const s = spinner()
118-
s.start('Comprobando requerimientos')
122+
s.start('Checking requirements')
119123
await systemRequirements()
120-
s.stop('Comprobando requerimientos')
124+
s.stop('Checking requirements')
121125

122-
s.start(`Creando proyecto`)
126+
s.start(`Creating project...`)
123127
const NAME_DIR: string = ['base', stepLanguage, stepProvider, stepDatabase].join('-')
124128
await createApp(NAME_DIR)
125-
s.stop(`Creando proyecto`)
126-
bannerDone(NAME_DIR)
127-
outro(color.inverse('Finalizado correctamente!'))
129+
s.stop(`Creating project...`)
130+
bannerDone(NAME_DIR, stepLanguage as string)
131+
outro(color.bgGreen(' Successfully completed! '))
128132
} catch (e: any) {
129133
console.log(e)
130134
if (e?.code === 'ERR_TTY_INIT_FAILED') return handleLegacyCli()
131-
cancel([`Ups! 🙄 algo no va bien.`, `Revisa los requerimientos mínimos en la documentación`].join('\n'))
135+
cancel([`Oops! 🙄 something is not right.`, `Check the minimum requirements in the documentation`].join('\n'))
132136
return process.exit(0)
133137
}
134138
}
Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
# `contexts-ts`
1+
<p align="center">
2+
<a href="https://builderbot.vercel.app/">
3+
<h2 align="center">@builderbot/contexts-dialogflow-cx</h2>
4+
</a>
5+
</p>
26

3-
> TODO: description
47

5-
## Usage
8+
## Documentation
69

7-
```
8-
const contextsTs = require('contexts-ts');
10+
Visit [builderbot](https://builderbot.vercel.app/) to view the full documentation.
911

10-
// TODO: DEMONSTRATE API
11-
```
12+
13+
## Official Course
14+
15+
If you want to discover all the functions and features offered by the library you can take the course.
16+
[View Course](https://app.codigoencasa.com/courses/builderbot?refCode=LEIFER)
17+
18+
19+
## Contact Us
20+
- [💻 Discord](https://link.codigoencasa.com/DISCORD)
21+
- [👌 𝕏 (Twitter)](https://twitter.com/leifermendez)

0 commit comments

Comments
 (0)