Skip to content

Commit

Permalink
fb bot now understands numbers to choose the desired option
Browse files Browse the repository at this point in the history
rampatra committed Aug 24, 2019
1 parent 6799d91 commit f40ddc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jbot-example/src/main/java/example/jbot/facebook/FbBot.java
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ public void onReceiveQuickReply(Event event) {
*
* @param event
*/
@Controller(events = EventType.MESSAGE, pattern = "(?i:button)")
@Controller(events = EventType.MESSAGE, pattern = "(?i:button|1)")
public void showButtons(Event event) {
Button[] buttons = new Button[]{
new Button().setType("web_url").setUrl("http://blog.ramswaroop.me").setTitle("JBot Docs"),
@@ -110,7 +110,7 @@ public void showButtons(Event event) {
*
* @param event
*/
@Controller(events = EventType.MESSAGE, pattern = "(?i:list)")
@Controller(events = EventType.MESSAGE, pattern = "(?i:list|2)")
public void showList(Event event) {
Element[] elements = new Element[]{
new Element().setTitle("AnimateScroll").setSubtitle("A jQuery Plugin for Animating Scroll.")
@@ -153,7 +153,7 @@ public void showGithubLink(Event event) {
*
* @param event
*/
@Controller(pattern = "(?i)(setup meeting)", next = "confirmTiming")
@Controller(pattern = "(?i)(setup meeting|3)", next = "confirmTiming")
public void setupMeeting(Event event) {
startConversation(event, "confirmTiming"); // start conversation
reply(event, "Cool! At what time (ex. 15:30) do you want me to set up the meeting?");

0 comments on commit f40ddc1

Please sign in to comment.