botpress/botpress-api.ai

botpress-api.ai API Error. Could not process incoming text: event.reply is not a function

dadaphl opened this issue · 1 comments

Hello,

Installed and activated api.ai middleware right after creating a new botpress project. API.ai API-Token is correctly set. Tried with "Client access token" and "Developer access token". Mode Default and Fulfillment tried. As soon as I "Say Hi" the following error appears in console.

philipp:name-of-your-bot/ $ bp start
18:21:38 - info: Starting botpress version 1.0.8
18:21:38 - info: Loaded botpress-api.ai, version 2.0.9
18:21:38 - verbose: [UMM] Enabled for web
18:21:38 - info: Loaded botpress-web, version 1.2.3
18:21:38 - info: Loaded 2 modules
18:21:38 - debug: SKIPPING middleware: UMM.instrumentation  [Reason=disabled]
18:21:38 - debug: Loading middleware: apiai.incoming
18:21:38 - debug: Loading middleware: hear
18:21:38 - debug: Loading middleware: conversations
18:21:38 - debug: Loading middleware: web.sendMessages
18:21:38 - debug: SKIPPING middleware: UMM.instrumentation  [Reason=disabled]
18:21:38 - debug: Loading middleware: apiai.incoming
18:21:38 - debug: Loading middleware: hear
18:21:38 - debug: Loading middleware: conversations
18:21:38 - debug: Loading middleware: web.sendMessages
18:21:38 - info: Bot launched. Visit: http://localhost:3000
TypeError: event.reply is not a function
    at bp.hear (/Users/philipp/dev/node-projects/bots/name-of-your-bot/index.js:27:11)
    at /Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/botpress/lib/webpack:/src/listeners.js:44:9
    at exec (/Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/mware/index.js:50:23)
    at Function.run (/Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/mware/index.js:63:7)
    at handler (/Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/botpress/lib/webpack:/src/hear.js:8:11)
    at exec (/Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/mware/index.js:50:23)
    at next (/Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/mware/index.js:60:9)
    at /Users/philipp/dev/node-projects/bots/name-of-your-bot/node_modules/botpress-api.ai/bin/webpack:/src/index.js:48:9
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)
18:21:49 - warn: botpress-api.ai API Error. Could not process incoming text: event.reply is not a function
^C
philipp:name-of-your-bot/ $ node -v
v8.1.2
philipp:name-of-your-bot/ $

never mind, accidentally disabled first middleware. Its a bid odd, that it automatically saves with a single click.