npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

huydo-channel-messenger

v10.34.2

Published

Official Facebook Messenger connector for botpress

Downloads

9

Readme

Botpress Messenger

Install

npm i @botpress/channel-messenger

Getting started

  1. Run npm start. Since you don't have configuration an error will be displayed to console which is fine. Once it's displayed bot will create default configuration which you'll need to edit after stopping the bot.
  2. You need to create Facebook App

Explaining config keys

Config template

"displayGetStarted" - exclude/include interaction with Get Started. Default: true

"greetingMessage" - set default messege. Default: "Default greeting message"

"persistentMenu" - added menu to your messenger. See more

"persistentMenuItems" - <needs investigation>

"composerInputDisabled" - <needs investigation>

"targetAudience" - decied who will can/can't use your chat. Default: "openToAll"

  1. "openToAll"
  2. "openToSome" - chat is available for people from "targetAudienceOpenToSome" list
  3. "closeToSome" - chat isn't available for people from "targetAudienceCloseToSome" list
  4. "closeToAll" - chat unavailable for all

"autoResponseOption" - used for send automaticaly something (depend on used value) to user when he/she click on Get Started It has three variant of value "autoResponseText"|"autoResponsePostback"|"noResponse"

  1. "autoResponseText" - send text to user. Text takes from autoResponseText
  2. "autoResponsePostback" - <needs investigation>
  3. "noResponse" - auto response off

Features

Incoming

Outgoing

Reference

Incoming

You can listen to incoming event easily with Botpress by using bp built-in hear function. You only need to listen to specific Messenger event to be able to react to user's actions.

bp.hear({ platform: 'facebook', type: 'postback', text: 'GET_STARTED' }, (event, next) => {
      bp.renderers.sendToUser(event.user.id, '#!text-77734', { typingIndicators: false })
   }
})

In fact, this module preprocesses almost all types of message (message, attachment, postback, quick_reply, delivery, read, optin, referrals...) and send them to incoming middlewares. When you build a bot or a module, you can access to all information about incoming messages that have been send to middlewares.