Skip to content

Instantly share code, notes, and snippets.

@makefunstuff
Created March 16, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makefunstuff/8f9b0fcfd5101f539637c6d542e2a342 to your computer and use it in GitHub Desktop.
Save makefunstuff/8f9b0fcfd5101f539637c6d542e2a342 to your computer and use it in GitHub Desktop.
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