![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Aboie is a Framework for Facebook Messanger bots built with Ruby.
Aboie is a french command when training dogs that means Speak or Bark.
This assumes you have read the facebook docs https://developers.facebook.com/docs/messenger-platform, and have created an api key.
Add
gem 'aboie
it
Create an initializer with the following
Aboie.configure do |config|
config.api_key = "messanger_api_key"
end
Follow the instructions to setup an inbound webhook for the Messanger Api. Aboie can help you parse through the large object and make sense of it.
module Webhooks
class FacebooksController < ActionController::Base
include Webhooks::Facebook::Verifiable
def create
messages = Aboie.parse_payload(params)
message = messages.first
query = message[:text]
response = Chat::Brain.ask(query)
Aboie.send_text(message[:sender], response)
render nothing: true, status: :ok
end
end
end
Aboie.parse_payload(params) will parse the array of potential messages, into a simple array containing a hash with {text: "Message", sender: "SenderId"}
this data can be used to formulate a response and respond to the proper sender id, using Aboie's easy message sending capabilities via Aboie.send_text
which takes a (sender_id, message)
as outlined in the example.
For issues, please submit a Github issue with steps on how to reproduce the problem.
Contributions are welcome. Tests are encouraged.
To run tests / ensure your changes have not caused any regressions:
rspec
FAQs
Unknown package
We found that aboie demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.