mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-21 13:09:16 +00:00
Initial Mod v2
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
const {get, reply, getIA} = require('../adapter')
|
||||
const {saveExternalFile, checkIsUrl} = require('./handle')
|
||||
|
||||
const getMessages = async (message) => {
|
||||
const data = await get(message)
|
||||
const getMessages = async (message, num) => { //MOD by CHV - Agregamos el parametro "num" para recibir el numero desde "app.js"
|
||||
// console.log("GETMESSAGES (flow.js)")
|
||||
const data = await get(message, num) //MOD by CHV - Agregamos "num"
|
||||
return data
|
||||
}
|
||||
|
||||
@@ -15,8 +16,8 @@ const responseMessages = async (step) => {
|
||||
return data
|
||||
}
|
||||
|
||||
const bothResponse = async (message, sessionId) => {
|
||||
const data = await getIA(message, sessionId)
|
||||
const bothResponse = async (message) => {
|
||||
const data = await getIA(message)
|
||||
if(data && data.media){
|
||||
const file = await saveExternalFile(data.media)
|
||||
return {...data,...{media:file}}
|
||||
|
||||
Reference in New Issue
Block a user