davidmann4 / botstack

rapid chatbot development with ruby on rails
127 stars 23 forks source link

Replaced class methods with instance methods in bot logic #27

Closed mraaroncruz closed 7 years ago

mraaroncruz commented 7 years ago

Also updated rails to use the global $bot instead of class name

mraaroncruz commented 7 years ago

Crap, i think this breaks @fb_params

mraaroncruz commented 7 years ago

Nope, different error dealing with default args to quick_reply. False alarm. We good!

davidmann4 commented 7 years ago

merge conflict because of code formating?

mraaroncruz commented 7 years ago

There you go. That was a good time 🎉

davidmann4 commented 7 years ago

hmm I get an error with reply_message - any ideas?

davidmann4 commented 7 years ago

NoMethodError (undefined method sender' for #<Hash:0x007f63d93fc2c8> Did you mean? send): lib/bot/base_bot_logic.rb:20:inreply_message' lib/bot/bot_logic.rb:20:in bot_logic' lib/bot/base_bot_logic.rb:207:inhandle_request' app/bots/main.rb:7:in `block in <top (required)>'

Rendered /home/cemputer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (1.9ms) Rendered /home/cemputer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms) Rendered /home/cemputer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) Rendered /home/cemputer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (14.4ms)

davidmann4 commented 7 years ago

ahh guess I found the error nevermind

davidmann4 commented 7 years ago

changes are great but I had problems with a bot I want to show tomorrow so I reverted it - will put it back soon!