Comments (6)
Specifically, I am trying the example bot.rb, and hints are not working. It seems like it can't trigger postback action.
from rubotnik.
Can you provide an example please? I’ll look into it
from rubotnik.
In the demo bot, the all: true
means, for instance, that the prompt for user location can be triggered by any of the phrases "Where am I", "Tell me where I am", etc, as long as all words "I", "where" and "am" are present in the sentence in any order. If one of them is missing — prompt won't be triggered. What's your use case?
from rubotnik.
Hi @progapandist, I am basically trying to work with the example bot.rb that you have provided, but it does not work when I try to click the hint words: where I am or take questionnaire.
I am not sure what is the problem. Maybe the quick replies can't catch the postback? or all:true does not work properly? In order to solve it temporarily, I have altered the code like this:
bind "take questionnaire", "sample questionnaire", to: :start_questionnaire, start_thread: {
message: questionnaire_welcome,
quick_replies: questionnaire_replies
}
bind "Where am I?", to: :lookup_location, start_thread: {
message: 'Let me know your location',
quick_replies: LOCATION_PROMPT
}
where is the original was:
bind 'questionnaire', to: :start_questionnaire, start_thread: {
message: questionnaire_welcome,
quick_replies: questionnaire_replies
}
bind 'where', 'am', 'I', all: true, to: :lookup_location, start_thread: {
message: 'Let me know your location',
quick_replies: LOCATION_PROMPT
}
I have also individually tried the code below, and when I type 'all true', it won't give me a response. so I believe all:true is somehow is not working.
bind 'all', 'true', all:true do
say "all true really"
end
Thank you for your quick response!
from rubotnik.
Hi, I guess it's my fault, I introduced a bug, here's how to fix it if you already cloned the boilerplate and adopted it for your project:
Change this line in message_dispatch.rb
to:
regexps = regex_strings.map { |rs| /\b#{rs}/i }
Then please confirm that it worked and I'm going to update the boilerplate on GH too 😌
from rubotnik.
Yes, that solves the problem! Thank you so much!
from rubotnik.
Related Issues (14)
- Describe FBOpenGraphTemplate in README
- Remove extra dependencies HOT 1
- Test coverage
- Wit.AI intergration
- Logging
- FBButtonTemplate is broken
- Move all rubotnik modules/classes to Rubotnik namespace
- newbie ngrok http 5000 HOT 5
- Unable to start Puma HOT 3
- Wit.ai Integration HOT 4
- Database Connection and Rake Tasks HOT 1
- Binding matches multiple commands HOT 1
- Add open graph template HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rubotnik.