This commit is contained in:
2023-02-03 18:17:11 -06:00
parent ce9d82fcf7
commit 652515adb9
10 changed files with 982 additions and 172 deletions

View File

@@ -6,12 +6,12 @@ const stepsReponse = require('../flow/response.json')
const { isUndefined } = require('util');
var msjsRecibidos = [];
var ultimoStep; //MOD by CHV -
var pasoAnterior = []; //MOD by CHV - Para guardar el paso anterior de cada número.
// var pasoAnterior = []; //MOD by CHV - Para guardar el paso anterior de cada número. (MOD - global en app.js)
var pasoRequerido; //MOD by CHV -
var vamosA = ""; //MOD by CHV -
var _vamosA = ""; //MOD by CHV -
var VA = ""; //MOD by CHV -
var elNum; //MOD by CHV -
var cumplePasoPrevio; //MOD by CHV -
var cumplePasoPrevio = []; //MOD by CHV -
const resps = require('../flow/response.json'); //MOD by CHV - Agregamos para traer las respuestas.
const { appendFile } = require('fs')
/**
@@ -51,6 +51,7 @@ const get = (message, num) => new Promise((resolve, reject) => { //MOD by CHV -
if (process.env.DATABASE === 'none') {
var { key } = stepsInitial.find(k => k.keywords.includes(message)) || { key: null }
console.log("KEY="+key)
/* ############################################### * REGEXP * ####################################################
Si queremos usar RegExp, en los "keywords" de inital.json, en lugar de un arreglo usamos un string (quitamos los [])
@@ -70,38 +71,50 @@ const get = (message, num) => new Promise((resolve, reject) => { //MOD by CHV -
var {keywords} = stepsInitial.find(k => k.key.includes(key)) || { keywords: null }
if(!Array.isArray(keywords)){key=null;}//Si "keywords" no es arreglo entonces ponemos "key" en null y usamos REGEXP para buscar reglas.
if(key == null && message.length > 0){
console.log("======= KEY ES NULO USAMOS REGEXP =======");
var logRegEx = true
console.log("======= KEY ES NULO, USAMOS REGEXP =======");
for (i=0; i<stepsInitial.length;i++){
// console.log(i, stepsInitial[i].keywords, message.match(stepsInitial[i].keywords.toString().replaceAll("*",".*")));
if(!Array.isArray(stepsInitial[i].keywords)){// Si "Keywords" NO es arreglo entonces ...
x = null;
console.log("KEY=|" + stepsInitial[i].key.toString() + "|" )
var coincideKeyword = null;
// console.log("KEY=|" + stepsInitial[i].key.toString() + "|" )
// if(resps[stepsInitial[i].key.toString()].pasoRequerido != undefined){pr = resps[stepsInitial[i].key].pasoRequerido};
// console.log(resps[stepsInitial[i].key.toString()].pasoRequerido== ultimoStep)
console.log("Esta Key=" + stepsInitial[i].key.toString() + " - pasoReq=" + resps[stepsInitial[i].key.toString()].pasoRequerido + " - PasoAnt=" + ultimoStep+"|"+pasoAnterior[elNum])
if(logRegEx) console.log("*** PASO=" + stepsInitial[i].key.toString() + " - REQUERIDO=" + resps[stepsInitial[i].key.toString()].pasoRequerido + " - ANTERIOR=" + pasoAnterior[elNum])
//Si NO hay paso requerido, o el paso requerido es IGUAL al paso anterior, entonces ...
if(resps[stepsInitial[i].key.toString()].pasoRequerido == undefined || resps[stepsInitial[i].key.toString()].pasoRequerido == pasoAnterior[elNum]){
var tempKeyword = "";
if(logRegEx) console.log(" - El paso requerido COINCIDE con el anterior, o NO hay paso requerido.")
if (stepsInitial[i].keywords == "%solo_correos%"){
console.log("solo_correos")
if(logRegEx) console.log("solo_correos")
tempKeyword = "[a-zA-Z0-9]+[_a-zA-Z0-9\.-]*[a-zA-Z0-9]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+[\.][a-zA-Z]{2,12})"}
else{tempKeyword = stepsInitial[i].keywords.toString().replaceAll("*",".*")}
x = message.match(tempKeyword);
else {
tempKeyword = stepsInitial[i].keywords.toString().replaceAll("*",".*")
}
coincideKeyword = message.match(tempKeyword); // Verdadero cuando el mensaje COINCIDE con la palabre clave.
// console.log("Keywords="+stepsInitial[i].keywords + " - key=" + stepsInitial[i].key + " - pasoReq=" + resps[stepsInitial[i].key].pasoRequerido + " - PasoAnt=" + ultimoStep)
// console.log("x:"+x+" - ultimoStep="+ultimoStep+" - pasoReq="+resps[stepsInitial[i].key].pasoRequerido);
// console.log("coincideKeyword:"+coincideKeyword+" - ultimoStep="+ultimoStep+" - pasoReq="+resps[stepsInitial[i].key].pasoRequerido);
// console.log(resps[stepsInitial[i].key].replyMessage.toString())
if (x != null){
if (coincideKeyword != null){ //Si el mensaje COINCIDE con la palabra clave.
if(logRegEx) console.log(" - - El mensaje COINCIDE con el keyword")
key = stepsInitial[i].key;
if(resps[stepsInitial[i].key].pasoRequerido != null && resps[stepsInitial[i].key].pasoRequerido != pasoAnterior[elNum]){key=null;}
// console.log("KEY="+key+" - X="+x);
//Si HAY paso requerido, y el paso requerido es DIFERENTE del paso anterior, entonces ...
if(resps[stepsInitial[i].key].pasoRequerido != null && resps[stepsInitial[i].key].pasoRequerido != pasoAnterior[elNum]){
key=null
if(logRegEx) console.log(" - - - Hay paso requerido y NO coincide con en paso anterior")
}
// console.log("KEY="+key+" - coincideKeyword="+coincideKeyword);
if(resps[stepsInitial[i].key].replyMessage.toString().search("/URL") > -1){
console.log("**************** HAY URL ****************")
if(logRegEx) console.log("**************** HAY URL ****************")
}
break;
}
else{x = null;}
} else
{ console.log("NO CUMPLE PASO REQ");
console.log("pasoReq=" + resps[stepsInitial[i].key.toString()].pasoRequerido + " - PasoAnt=" + ultimoStep)
else {
coincideKeyword = null
}
}
else {
if(logRegEx) console.log("--- NO CUMPLE PASO REQ");
// console.log("pasoReq=" + resps[stepsInitial[i].key.toString()].pasoRequerido + " - PasoAnt=" + ultimoStep)
}
}
}
@@ -114,19 +127,19 @@ const get = (message, num) => new Promise((resolve, reject) => { //MOD by CHV -
// if(key != null){remplazos(resps[key].replyMessage.join(''));}
if(resps[key]!=undefined){VA = resps[key].goto}else{VA=null}
cumplePasoRequerido(key);
vamosA = VA;
// console.log(elNum)
_vamosA = VA;
console.log("cumplePasoPrevio[elNum]=", cumplePasoPrevio[elNum])
if(vamosA != "" && vamosA != undefined && cumplePasoPrevio == true){
// console.log("ASIGNAMOS VAMOSA = " + vamosA);
pasoAnterior[elNum] = vamosA;
if(_vamosA != "" && _vamosA != undefined && cumplePasoPrevio[elNum] == true){
console.log("ASIGNAMOS _VAMOSA = " + _vamosA);
pasoAnterior[elNum] = _vamosA;
}
// console.log("ULTIMOSTEP="+ultimoStep)
vamosA = "";
_vamosA = "";
// console.log("MESSAGE: "+message);
// console.log("KEY: "+key);
// console.log("RESPONSE: "+response);
if(cumplePasoPrevio) {resolve(response);}
if(cumplePasoPrevio[elNum]) {resolve(response);}
}
/**
@@ -137,7 +150,6 @@ const get = (message, num) => new Promise((resolve, reject) => { //MOD by CHV -
resolve(dt)
});
}
})
const reply = (step) => new Promise((resolve, reject) => {
@@ -203,7 +215,18 @@ const saveMessage = ( message, trigger, number, regla ) => new Promise( async (r
}
})
module.exports = { get, reply, getIA, saveMessage, remplazos, stepsInitial } //MOD by CHV - Agregamos "remplazos" y "stepsInitial" para usarlos en "apps.js"
module.exports = { get, reply, getIA, saveMessage, remplazos, stepsInitial, vamosA } //MOD by CHV - Agregamos "remplazos" y "stepsInitial" para usarlos en "apps.js"
/**
* Asigna el valor especificado a la variable pasoAnterior.
* Esta hace que el flujo se redirija al paso siguente al especificado.
* @param {elNum} El numero del remitente.
* @param {elPaso} El paso al que se va redirigir el flujo.
*/
function vamosA (elNum, elPaso){
pasoAnterior[elNum] = elPaso;
console.log("Asignamos pasoAnterior con " + elPaso, elNum)
}
/**
* Reemplaza texto en la respuesta con variables predefinidas.
@@ -276,7 +299,7 @@ function remplazos(elTexto, extraInfo){
}
if(laLista[i].search('%msjant_')>-1){//Remplaza con el mensaje anterior especificado.
var histlMsjs = {};
console.log("entramos a msjant")
// console.log("entramos a msjant")
// var hayHistorial = (chkFile(`${__dirname}/chats/`+from+".json"));
if(chkFile(`${__dirname}/../chats/`+elNum+".json")){
let rawdata = fs.readFileSync(`./chats/${elNum}.json`);
@@ -286,18 +309,18 @@ function remplazos(elTexto, extraInfo){
var inicio = laLista[i].search('%msjant_');
var final = laLista[i].indexOf("%", inicio+1);
var subStr = laLista[i].substring(inicio, final+1);
console.log("Substr = |" + subStr + "|");
// console.log("Substr = |" + subStr + "|");
var partes = subStr.toString().split('_');
if(partes.length > 1){
console.log("Partes[1] = |" + partes[1] + "|");
// console.log("Partes[1] = |" + partes[1] + "|");
let posicion0 = partes[1].substring(0, partes[1].length-1)
console.log("Posicion0 = |" + posicion0 + "|");
// console.log("Posicion0 = |" + posicion0 + "|");
posicion = ((posicion0*1) + 1);
console.log("Posicion = " + posicion);
console.log( elHistorial.length );
console.log((elHistorial.length*1)-posicion);
console.log("Mensaje="+elHistorial[elHistorial.length - posicion]["message"])
elTexto = elTexto.toString().replace(subStr, elHistorial[elHistorial.length - posicion]["message"]);
// console.log("Posicion = " + posicion);
// console.log( elHistorial.length );
// console.log((elHistorial.length*1)-posicion);
// console.log("Mensaje="+elHistorial[elHistorial.length - posicion]["message"])
elTexto = elTexto.toString().replace(subStr, elHistorial[elHistorial.length - posicion]["message"].trim());
}
// histlMsjs = elHistorial["messages"];
// totalMsjs = histlMsjs.length-1;
@@ -341,7 +364,7 @@ function remplazos(elTexto, extraInfo){
}
}
// console.log("EL TEXTO="+elTexto);
return elTexto
return elTexto.trim()
}
/**
@@ -352,15 +375,15 @@ function remplazos(elTexto, extraInfo){
if(resps[step]!=undefined){pasoRequerido=resps[step].pasoRequerido}else{pasoRequerido=null}
if((pasoRequerido != null && pasoRequerido == ultimoStep)){
// console.log("REQUIERE PASO PREVIO Y CUMPLE");
cumplePasoPrevio = true;
cumplePasoPrevio[elNum] = true;
}
else if((pasoRequerido != null && pasoRequerido != pasoAnterior[elNum])){
// console.log("REQUIERE PASO PREVIO Y NO LO CUMPLE");
cumplePasoPrevio = false;
cumplePasoPrevio[elNum] = false;
}
else{
// console.log("NO REQUIERE PASO PREVIO")
cumplePasoPrevio = true;
cumplePasoPrevio[elNum] = true;
}
pasoAnterior[elNum] = step
ultimoPaso = pasoRequerido;

394
adapter/test.js Normal file
View File

@@ -0,0 +1,394 @@
+++++++++++++++++++++++++++++++++++++ INICIO +++++++++++++++++++++++++++++++++++++++
HORA:4:55:56 PM FROM:5215519561677@c.us, BODY:/Guna, HASMEDIA:false
NUEVA RESPUESTA= Mensaje de getGunaCats
############# Encontramos Funcion, ejecutamos funcion getGunaCats
1 { id: 'CHOCOLATE', title: 'CHOCOLATE' }
2 { id: 'DULCES', title: 'DULCES' }
lasOpciones=[object Object]
List {
description: 'Buenas tardes, selecciona una categoría 👇🏽',
buttonText: 'Ver las categorías',
title: 'Categorías',
footer: 'Selecciona',
sections: [ { title: 'Categorías', rows: [Array] } ]
}
<ref *1> Client {
_events: [Object: null prototype] {
qr: [Function (anonymous)],
ready: [Function (anonymous)],
auth_failure: [Function (anonymous)],
authenticated: [Function (anonymous)],
message: [AsyncFunction (anonymous)],
message_create: [AsyncFunction (anonymous)]
},
_eventsCount: 6,
_maxListeners: undefined,
options: {
authStrategy: LocalAuth {
dataPath: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\.wwebjs_auth',
clientId: undefined,
client: [Circular *1],
userDataDir: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\.wwebjs_auth\\session'
},
puppeteer: {
headless: true,
args: [Array],
defaultViewport: null,
userDataDir: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\.wwebjs_auth\\session'
},
authTimeoutMs: 0,
qrMaxRetries: 0,
takeoverOnConflict: false,
takeoverTimeoutMs: 0,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36',
ffmpegPath: 'ffmpeg',
bypassCSP: false
},
authStrategy: LocalAuth {
dataPath: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\.wwebjs_auth',
clientId: undefined,
client: [Circular *1],
userDataDir: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\.wwebjs_auth\\session'
},
pupBrowser: <ref *2> Browser {
eventsMap: Map(2) { 'targetcreated' => [], 'targetchanged' => [] },
emitter: {
all: [Map],
on: [Function: on],
off: [Function: off],
emit: [Function: emit]
},
_ignoredTargets: Set(0) {},
_ignoreHTTPSErrors: false,
_defaultViewport: null,
_process: ChildProcess {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
_closesNeeded: 2,
_closesGot: 0,
connected: false,
signalCode: null,
exitCode: null,
killed: false,
spawnfile: 'C:\\Users\\cheve\\Documents\\GitHub\\botDemoGuna\\node_modules\\puppeteer\\.local-chromium\\win64-982053\\chrome-win\\chrome.exe',
_handle: [Process],
spawnargs: [Array],
pid: 7188,
stdin: [Socket],
stdout: null,
stderr: [Socket],
stdio: [Array],
[Symbol(kCapture)]: false
},
_screenshotTaskQueue: TaskQueue { _chain: [Promise] },
_connection: Connection {
eventsMap: [Map],
emitter: [Object],
_lastId: 372,
_sessions: [Map],
_closed: false,
_callbacks: Map(0) {},
_url: 'ws://127.0.0.1:49386/devtools/browser/8ba98a74-7751-45aa-8256-8f82b8312e65',
_delay: 0,
_transport: [NodeWebSocketTransport]
},
_closeCallback: [Function: bound close],
_targetFilterCallback: [Function (anonymous)],
_defaultContext: BrowserContext {
eventsMap: Map(0) {},
emitter: [Object],
_connection: [Connection],
_browser: [Circular *2],
_id: undefined
},
_contexts: Map(0) {},
_targets: Map(5) {
'4904d96d-4dec-4069-95d8-fe7d70f62b06' => [Target],
'71cc8c5e-8516-49de-9387-b2940074aea5' => [Target],
'C7071524BC87DF4C8E9569AD3FBB7348' => [Target],
'1D7791C3C62A14FB306A0ABD1CD86677' => [Target],
'969B67293789E4A52B827E4619DF58D7' => [Target]
}
},
pupPage: <ref *3> Page {
eventsMap: Map(1) { 'framenavigated' => [Array] },
emitter: {
all: [Map],
on: [Function: on],
off: [Function: off],
emit: [Function: emit]
},
_closed: false,
_timeoutSettings: TimeoutSettings {
_defaultTimeout: null,
_defaultNavigationTimeout: null
},
_pageBindings: Map(12) {
'loadingScreen' => [AsyncFunction (anonymous)],
'qrChanged' => [AsyncFunction (anonymous)],
'onAddMessageEvent' => [Function (anonymous)],
'onChangeMessageTypeEvent' => [Function (anonymous)],
'onChangeMessageEvent' => [Function (anonymous)],
'onRemoveMessageEvent' => [Function (anonymous)],
'onMessageAckEvent' => [Function (anonymous)],
'onMessageMediaUploadedEvent' => [Function (anonymous)],
'onAppStateChangedEvent' => [AsyncFunction (anonymous)],
'onBatteryStateChangedEvent' => [Function (anonymous)],
'onIncomingCall' => [Function (anonymous)],
'onReaction' => [Function (anonymous)]
},
_javascriptEnabled: true,
_workers: Map(1) { '96E97F3B444D00EB81EFEFDBC3128749' => [WebWorker] },
_fileChooserInterceptors: Set(0) {},
_userDragInterceptionEnabled: false,
_handlerMap: WeakMap { <items unknown> },
_client: CDPSession {
eventsMap: [Map],
emitter: [Object],
_callbacks: Map(0) {},
_connection: [Connection],
_targetType: 'page',
_sessionId: '44F15C73737F3B036CBCBE340984F10E'
},
_target: Target {
_targetInfo: [Object],
_browserContext: [BrowserContext],
_targetId: 'C7071524BC87DF4C8E9569AD3FBB7348',
_sessionFactory: [Function (anonymous)],
_ignoreHTTPSErrors: false,
_defaultViewport: null,
_screenshotTaskQueue: [TaskQueue],
_pagePromise: [Promise],
_workerPromise: null,
_initializedCallback: [Function (anonymous)],
_initializedPromise: [Promise],
_closedCallback: [Function (anonymous)],
_isClosedPromise: [Promise],
_isInitialized: true
},
_keyboard: Keyboard {
_modifiers: 0,
_pressedKeys: Set(0) {},
_client: [CDPSession]
},
_mouse: Mouse {
_x: 0,
_y: 0,
_button: 'none',
_client: [CDPSession],
_keyboard: [Keyboard]
},
_touchscreen: Touchscreen { _client: [CDPSession], _keyboard: [Keyboard] },
_accessibility: Accessibility { _client: [CDPSession] },
_frameManager: FrameManager {
eventsMap: [Map],
emitter: [Object],
_frames: [Map],
_contextIdToContext: [Map],
_isolatedWorlds: [Set],
_client: [CDPSession],
_page: [Circular *3],
_networkManager: [NetworkManager],
_timeoutSettings: [TimeoutSettings],
_mainFrame: [Frame]
},
_emulationManager: EmulationManager {
_emulatingMobile: false,
_hasTouch: false,
_client: [CDPSession]
},
_tracing: Tracing { _recording: false, _path: '', _client: [CDPSession] },
_coverage: Coverage { _jsCoverage: [JSCoverage], _cssCoverage: [CSSCoverage] },
_screenshotTaskQueue: TaskQueue { _chain: [Promise] },
_viewport: null
},
info: ClientInfo {
pushname: 'Omega',
wid: {
server: 'c.us',
user: '5215527026728',
_serialized: '5215527026728@c.us'
},
me: {
server: 'c.us',
user: '5215527026728',
_serialized: '5215527026728@c.us'
},
phone: undefined,
platform: 'android'
},
interface: InterfaceController {
pupPage: <ref *3> Page {
eventsMap: [Map],
emitter: [Object],
_closed: false,
_timeoutSettings: [TimeoutSettings],
_pageBindings: [Map],
_javascriptEnabled: true,
_workers: [Map],
_fileChooserInterceptors: Set(0) {},
_userDragInterceptionEnabled: false,
_handlerMap: [WeakMap],
_client: [CDPSession],
_target: [Target],
_keyboard: [Keyboard],
_mouse: [Mouse],
_touchscreen: [Touchscreen],
_accessibility: [Accessibility],
_frameManager: [FrameManager],
_emulationManager: [EmulationManager],
_tracing: [Tracing],
_coverage: [Coverage],
_screenshotTaskQueue: [TaskQueue],
_viewport: null
}
},
theMsg: Message {
_data: {
id: [Object],
body: '/Guna',
type: 'chat',
t: 1675378555,
notifyName: 'Alfredo',
from: '5215519561677@c.us',
to: '5215527026728@c.us',
self: 'in',
ack: 1,
isNewMsg: true,
star: false,
kicNotified: false,
recvFresh: true,
isFromTemplate: false,
pollInvalidated: false,
isSentCagPollCreation: false,
latestEditMsgKey: null,
latestEditSenderTimestampMs: null,
broadcast: false,
mentionedJidList: [],
isVcardOverMmsDocument: false,
isForwarded: false,
hasReaction: false,
productHeaderImageRejected: false,
lastPlaybackProgress: 0,
isDynamicReplyButtonsMsg: false,
isMdHistoryMsg: false,
stickerSentTs: 0,
isAvatar: false,
requiresDirectConnection: false,
pttForwardedFeaturesEnabled: true,
isEphemeral: false,
isStatusV3: false,
links: []
},
mediaKey: undefined,
id: {
fromMe: false,
remote: '5215519561677@c.us',
id: '3A98BA96F6922B404213',
_serialized: 'false_5215519561677@c.us_3A98BA96F6922B404213'
},
ack: 1,
hasMedia: false,
body: '/Guna',
type: 'chat',
timestamp: 1675378555,
from: '5215519561677@c.us',
to: '5215527026728@c.us',
author: undefined,
deviceType: 'ios',
isForwarded: false,
forwardingScore: 0,
isStatus: false,
isStarred: false,
broadcast: false,
fromMe: false,
hasQuotedMsg: false,
duration: undefined,
location: undefined,
vCards: [],
inviteV4: undefined,
mentionedIds: [],
orderId: undefined,
token: undefined,
isGif: false,
isEphemeral: false,
links: [],
numero: '5215519561677@c.us',
key: 'gunaCats',
lastStep: null,
step: 'gunaCats',
trigger: null,
replyMessage: 'Mensaje de getGunaCats'
},
[Symbol(kCapture)]: false
}
+++++++++++++++++++++++++++++++++++++ INICIO +++++++++++++++++++++++++++++++++++++++
HORA:4:56:00 PM FROM:5215519561677@c.us, BODY:DULCES, HASMEDIA:false
======= KEY ES NULO USAMOS REGEXP =======
KEY=|doblemensaje|
Esta Key=doblemensaje - pasoReq=menu - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=menu - PasoAnt=undefined
KEY=|recibenombre|
Esta Key=recibenombre - pasoReq=opcion3 - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=opcion3 - PasoAnt=undefined
KEY=|gRevisaCliente|
Esta Key=gRevisaCliente - pasoReq=gallina - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=gallina - PasoAnt=undefined
KEY=|gGuardainfo|
Esta Key=gGuardainfo - pasoReq=gRevisaCliente - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=gRevisaCliente - PasoAnt=undefined
KEY=|paq3|
Esta Key=paq3 - pasoReq=menu - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=menu - PasoAnt=undefined
KEY=|Desbloqueo|
Esta Key=Desbloqueo - pasoReq=soporte - PasoAnt=undefined|gunaCats
NO CUMPLE PASO REQ
pasoReq=soporte - PasoAnt=undefined
KEY=|gunaCats2|
Esta Key=gunaCats2 - pasoReq=gunaCats - PasoAnt=undefined|gunaCats
NUEVA RESPUESTA= Mensaje de getGunaCats2
############# Encontramos Funcion, ejecutamos funcion getGunaSubtipo
1 { id: 'KINDER', title: 'KINDER' }
2 { id: 'CHOCOLATE', title: 'CHOCOLATE' }
lasOpciones=undefined
+++++++++++++++++++++++++++++++++++++ INICIO +++++++++++++++++++++++++++++++++++++++
HORA:4:56:05 PM FROM:5215519561677@c.us, BODY:CHOCOLATE, HASMEDIA:false
======= KEY ES NULO USAMOS REGEXP =======
KEY=|doblemensaje|
Esta Key=doblemensaje - pasoReq=menu - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=menu - PasoAnt=undefined
KEY=|recibenombre|
Esta Key=recibenombre - pasoReq=opcion3 - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=opcion3 - PasoAnt=undefined
KEY=|gRevisaCliente|
Esta Key=gRevisaCliente - pasoReq=gallina - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=gallina - PasoAnt=undefined
KEY=|gGuardainfo|
Esta Key=gGuardainfo - pasoReq=gRevisaCliente - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=gRevisaCliente - PasoAnt=undefined
KEY=|paq3|
Esta Key=paq3 - pasoReq=menu - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=menu - PasoAnt=undefined
KEY=|Desbloqueo|
Esta Key=Desbloqueo - pasoReq=soporte - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=soporte - PasoAnt=undefined
KEY=|gunaCats2|
Esta Key=gunaCats2 - pasoReq=gunaCats - PasoAnt=undefined|gunaCats2
NO CUMPLE PASO REQ
pasoReq=gunaCats - PasoAnt=undefined
KEY=|gunaProds|
Esta Key=gunaProds - pasoReq=gunaCats2 - PasoAnt=undefined|gunaCats2
NUEVA RESPUESTA= Mensaje de getGunaCats2
############# Encontramos Funcion, ejecutamos funcion getGunaProds