mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 19:49:16 +00:00
add app.json heroku one click
This commit is contained in:
@@ -7,5 +7,6 @@
|
||||
- external download
|
||||
- add dialogflow
|
||||
- images less 1mb
|
||||
- easy deploy heroku
|
||||
|
||||
https://stackoverflow.com/questions/51855169/dialogflow-403-iam-permission-dialogflow-sessions-detectintent
|
||||
@@ -40,7 +40,7 @@ const detectIntent = async (queryText) => {
|
||||
const { intent } = queryResult || { intent: {} }
|
||||
const parseIntent = intent['displayName'] || null
|
||||
const parsePayload = queryResult['fulfillmentMessages'].find((a) => a.message === 'payload');
|
||||
|
||||
console.log(parseIntent)
|
||||
if (parsePayload && parsePayload.payload) {
|
||||
const { fields } = parsePayload.payload
|
||||
media = fields.media.stringValue || null
|
||||
|
||||
9
app.js
9
app.js
@@ -96,9 +96,14 @@ const withSession = () => {
|
||||
console.log(`Validando session con Whatsapp...`)
|
||||
sessionData = require(SESSION_FILE_PATH);
|
||||
client = new Client({
|
||||
session: sessionData
|
||||
session: sessionData,
|
||||
puppeteer: {
|
||||
args: [
|
||||
'--no-sandbox'
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
client.on('ready', () => {
|
||||
connectionReady()
|
||||
listenMessage()
|
||||
|
||||
38
app.json
Normal file
38
app.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "Chatbot Whatsapp (Leifer Mendez)",
|
||||
"description": "Este bot se realizo con la finalidad de aprender y utilizar nodejs, ademas le agregamos inteligencia artificial gracias a dialogflow",
|
||||
"repository": "https://github.com/leifermendez/bot-whatsapp",
|
||||
"logo": "https://avatars0.githubusercontent.com/u/15802366?s=460&u=77ec7ef359e8ed842aef769693f1675c0ed460fd&v=4",
|
||||
"keywords": [
|
||||
"nodejs",
|
||||
"whatsapp",
|
||||
"bot",
|
||||
"chatbot",
|
||||
"dialogflow"
|
||||
],
|
||||
"addons": [
|
||||
],
|
||||
"scripts": {
|
||||
"postdeploy": "php artisan migrate --force && php artisan db:seed --force"
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-google-chrome"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jontewks/puppeteer-heroku-buildpack"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
"SAVE_MEDIA": "false",
|
||||
"DATABASE": {
|
||||
"description": "Puedes usar none, mysql, dialogflow: Defecto: none",
|
||||
"value": "none"
|
||||
},
|
||||
"LANGUAGE": "es",
|
||||
"SQL_HOST":"",
|
||||
"SQL_USER":"",
|
||||
"SQL_PASS":"",
|
||||
"SQL_DATABASE":""
|
||||
}
|
||||
}
|
||||
1482
package-lock.json
generated
1482
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@
|
||||
"xlsx": "^0.16.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"pm2": "^5.1.2",
|
||||
"prettier": "2.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user