Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chatopera/manu-message

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chatopera/manu-message

SuperScript Message Object

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Message Object for SuperScript

This module creates message objects for SuperScript to consume.

You can add your own plugins to extend the message object to add extra properties to the message. For example, you might want to write a plugin that calls an external NLP service like wit.ai, or a plugin that does sentiment analysis on the message. Then, later reply plugin functions can use this extra information to do things like filter replies or add text programmatically to a reply.

API

  • createMessage(message, options, callback)

message is the original text to create a message with. options can have a factSystem and a scope.

  • loadPlugins(path)

path is a directory path of files of plugins to load.

### Example plugin

An example plugin might look something like this:

const addWords = function addWords(cb) {
  this.message.words = this.message.clean.split(' ');
  cb();
};

This simply add a words property to the message, so you could, say, filter out messages that weren't long or short enough in SuperScript.

FAQs

Package last updated on 03 Jan 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc