Russenger - Facebook Messenger Webhook Handling in Rust

Welcome to Russenger, a Rust library designed to simplify the handling of Facebook Messenger webhook responses. Russenger offers a convenient way to construct and send various types of responses, including text messages, quick replies, generic templates, and media attachments.
Features
- Custom Models: Developers can now use their own models with the Russenger library. This is made possible by the integration with rusql-alchemy, an ORM for sqlx. This means that models are defined in Rust code, eliminating the need to write SQL queries.
- Easy to Use: The Russenger library is designed to be easy to use. It provides a set of modules and macros that abstract away the complexities of building a bot, allowing you to focus on the logic of your application.
- Flexible: The Russenger library is flexible and can be used to build a wide variety of bots. It supports text-based conversations, quick replies, and custom actions.
Getting Started
To get started with the Russenger library, you'll need to install it as a dependency in your Rust project. You can do this by adding the following line to your Cargo.toml file:
[]
= "0.2.0"
= "4"
= "^0.7.0"
= "0.1.2" # the default feature is sqlite
# rusql-alchemy = { version = "0.1.2", features = ["mysql"] }
# rusql-alchemy = { version = "0.1.2", features = ["postgres"] }
Once you've installed the library, you can start building your bot! Check out the documentation for more information on how to use the library.
Creating a New Project
To create a new project using the Russenger library, you can use the cargo-generate tool. Here are the steps:
- Install
cargo-generate:
- Generate a new project:
Examples
Here are some examples of what you can build with the Russenger library:
A simple bot that greets users and asks for their name
use *;
use RussengerUser;
async
async
async
async
async
This example shows how to create a simple bot that greets users and asks for their name. It uses custom models to store and retrieve user data.
A bot that sends users a quick reply with a list of options and handles their response
use RussengerUser;
use *;
async
async
async
This example shows how to create a bot that sends users a quick reply with a list of options and handles their response.
Contributing
We welcome contributions to the Russenger library! If you have an idea for a new feature or have found a bug, please open an issue on the GitHub repository. If you'd like to contribute code, please fork the repository and submit a pull request.
License
The Russenger library is licensed under the MIT License. See the LICENSE file for more information.