Created
March 16, 2017 16:57
-
-
Save makefunstuff/8f9b0fcfd5101f539637c6d542e2a342 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bot.on :message do |message| | |
if message.quick_reply && message.quick_reply.match?('time') | |
message.reply(text: 'Thank you I will notify you very soon, have a good and productive day!') | |
end | |
if message.quick_reply && message.quick_reply == 'setup_started' | |
User.find_or_create_by(facebook_id: message.sender['id']) | |
message.reply( | |
text: 'When should I ask you about your day?', | |
quick_replies: [ | |
{ | |
content_type: 'text', | |
title: 'Every evening', | |
payload: 'time_morning' | |
}, | |
{ | |
content_type: 'text', | |
title: 'Every evening', | |
payload: 'time_evening' | |
} | |
]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment