'use strict';
const functions = require('firebase-functions');
// Import the appropriate service and chosen wrappers
const { dialogflow } = require('actions-on-google');
// Create an app instance
const app = dialogflow({debug: true});
// Register handlers for Dialogflow intents
app.intent('sortear numero', conv => {
var sorteio = Math.floor(Math.random() * 100);
sorteio = sorteio.toString();
return conv.ask(sorteio);
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
RECEBO ESSE ERRO Warning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail