Reputation: 79
I wrote function which work on firebase function and which take an answer on request if request come from the dialog console or the Google Assistant emulator. But if I ask from Telegram this function doesn't work.
Answer like Say that one more time?
or if I filled the form Responses
on web I have this response.
How connect firebase function with Telegram?
'use strict';
const {
dialogflow,
Permission,
Suggestions,
BasicCard,
} = require('actions-on-google');
const firebase = require('firebase');
const functions = require('firebase-functions');
const app = dialogflow({debug: true});
app.intent('simple word', (conv) => {
conv.ask(`it's ok`);
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
Upvotes: 2
Views: 251
Reputation: 50701
The problems is that you're using the actions-on-google library, which is specifically designed to send results to the Assistant.
If you want to be able to send results to Telegram, you need to use the dialogflow-fulfillment library, which handles things slightly differently.
Upvotes: 2