mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 12:39:24 +00:00
update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const dialogflow = require('@google-cloud/dialogflow');
|
const dialogflow = require('@google-cloud/dialogflow');
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const { nanoid } = require('nanoid')
|
const crypto = require('crypto');
|
||||||
/**
|
/**
|
||||||
* Debes de tener tu archivo con el nombre "chatbot-account.json" en la raíz del proyecto
|
* Debes de tener tu archivo con el nombre "chatbot-account.json" en la raíz del proyecto
|
||||||
*/
|
*/
|
||||||
@@ -32,7 +32,7 @@ const checkFileCredentials = () => {
|
|||||||
// Detect intent method
|
// Detect intent method
|
||||||
const detectIntent = async (queryText) => {
|
const detectIntent = async (queryText) => {
|
||||||
let media = null;
|
let media = null;
|
||||||
const sessionId = KEEP_DIALOG_FLOW ? 1 : nanoid();
|
const sessionId = KEEP_DIALOG_FLOW ? 1 : crypto.randomUUID();
|
||||||
const sessionPath = sessionClient.projectAgentSessionPath(PROJECID, sessionId);
|
const sessionPath = sessionClient.projectAgentSessionPath(PROJECID, sessionId);
|
||||||
const languageCode = process.env.LANGUAGE
|
const languageCode = process.env.LANGUAGE
|
||||||
const request = {
|
const request = {
|
||||||
|
|||||||
1790
package-lock.json
generated
1790
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@@ -1,14 +1,34 @@
|
|||||||
{
|
{
|
||||||
"name": "test-ws-bot",
|
"name": "bot-whatsapp",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "Bot de wahtsapp open source para MVP o pequeños negocios",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./app.js",
|
"start": "node ./app.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [
|
||||||
"author": "",
|
"whatsapp",
|
||||||
|
"bot-whatsapp",
|
||||||
|
"node-bot-whatsapp"
|
||||||
|
],
|
||||||
|
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"email": "leifer33@gmail.com",
|
||||||
|
"name": "Leifer Mendez",
|
||||||
|
"url": "https://leifermendez.github.io"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "aurik3",
|
||||||
|
"email": "aurik3@aurik3.com",
|
||||||
|
"url": "https://github.com/aurik3"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/leifermendez/bot-whatsapp"
|
||||||
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google-cloud/dialogflow": "^5.2.0",
|
"@google-cloud/dialogflow": "^5.2.0",
|
||||||
@@ -20,7 +40,6 @@
|
|||||||
"mime-db": "^1.52.0",
|
"mime-db": "^1.52.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"nanoid": "^4.0.0",
|
|
||||||
"qr-image": "^3.2.0",
|
"qr-image": "^3.2.0",
|
||||||
"qrcode-terminal": "^0.12.0",
|
"qrcode-terminal": "^0.12.0",
|
||||||
"socket.io": "^4.5.1",
|
"socket.io": "^4.5.1",
|
||||||
@@ -33,7 +52,7 @@
|
|||||||
"prettier": "2.7.1"
|
"prettier": "2.7.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "14.x"
|
"node": "16.x"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user