Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestChatbot #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ if (!config.SERVER_URL) { //used for ink to static files
throw new Error('missing SERVER_URL');
}



app.set('port', (process.env.PORT || 5000))

//verify request came from facebook
Expand All @@ -56,11 +54,6 @@ app.use(bodyParser.urlencoded({
// Process application/json
app.use(bodyParser.json());






const credentials = {
client_email: config.GOOGLE_CLIENT_EMAIL,
private_key: config.GOOGLE_PRIVATE_KEY,
Expand All @@ -77,7 +70,7 @@ const sessionClient = new dialogflow.SessionsClient(
const sessionIds = new Map();

// Index route
app.get('/', function (req, res) {
app.get('https://moayyadapp.herokuapp.com/webhook/', function (req, res) {
res.send('Hello world, I am a chat bot')
})

Expand Down Expand Up @@ -139,10 +132,6 @@ app.post('/webhook/', function (req, res) {
}
});





function receivedMessage(event) {

var senderID = event.sender.id;
Expand Down
18 changes: 9 additions & 9 deletions config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading