jschnurr / botkit-middleware-dialogflow

Botkit middleware for Dialogflow (formerly api.ai). Supports Dialogflow API v1 and V2.
MIT License
29 stars 18 forks source link

Middleware does not accept regex to match intents #5

Closed vbriquet closed 6 years ago

vbriquet commented 6 years ago

Hello,

I tried to handle small talk in my bot, but Dialogflow has more than 20 different intents for small talk, as per https://dialogflow.com/docs/reference/small-talk

Apparently this does not match anything: controller.hears('smalltalk(.*)', 'direct_message,direct_mention', dialogflowMiddleware.hears, function(bot, message) { // do something });

A similar issue was raised on botman and fixed, as per https://github.com/botman/botman/issues/252

Is this possible, or already supported ? Thanks !

jschnurr commented 6 years ago

Thanks for identifying this issue - fixed in v1.2.0.