2.0.1 • Published 3 months ago

chat-bridge v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Table of Contents

Features

  • Easy Integration: Simplifies the integration of Facebook Messenger webhook handling into your Node.js applications.
  • Incoming Events Handling: Provides a convenient way to handle incoming events from users.
  • Customizable: Offers flexibility for customization according to specific application needs.
  • Event Driven: Built on an event-driven architecture, making it easy to listen for and respond to various events.
  • Simple API: Provides a straightforward API for sending messages and interacting with users.
  • Scalable: Designed to scale with your application, handling high volumes of incoming messages efficiently.
  • Open Source: Licensed under the MIT License, Chat Bridge is open source and free to use.

Installation

Ready to get started? Install Chat Bridge using npm:

npm install chat-bridge

⚠️ Warning: Chat Bridge is currently in alpha, and is not yet ready for production use. We recommend that you do not use it in production until it reaches a stable release.

Usage

// Import the Client class
const { Client } = require('chat-bridge');

// Create a new client instance
const client = new Client({
    accessToken: 'YOUR_ACCESS_TOKEN',
    verifyToken: 'YOUR_VERIFY_TOKEN'
});

// Listen for incoming messages events
client.on('message', (event) => {
    const { sender, message } = event;

    // Send a text message back to the sender
    client.sendTextMessage(sender.id, `You wrote: ${message.text}`);
});

// Start the client
client.start(async () => {
    console.log(`Listening on ${client.page.name} (${client.page.id})`);
});

Documentation

You can read additional documents at Chat Bridge

Contributing

We welcome contributions!

Fixing a bug, adding a new feature, or improving the documentation — we're always happy to see your work.

Read up on our contributing guidelines and then check out one of our issues.

Acknowledgments

  • fastify — Fast and low overhead web framework, for Node.js
  • undici — HTTP/1.1 client, written from scratch for Node.js

License

Chat Bridge is licensed under the MIT License unless otherwise specified.


2.0.1

3 months ago

2.0.0

3 months ago

1.3.0

3 months ago

1.2.0

4 months ago

1.1.0-alpha

4 months ago

1.2.1

4 months ago

1.0.0-alpha

4 months ago

0.1.2-alpha

4 months ago

0.1.1-alpha

4 months ago