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

conduit-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conduit-plugin

Base plugin for Conduit

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Conduit Plugin

Base plugin for Conduit

Conduit comes with a simple plugin API. Conduit will try to load plugins from the plugins folder. Each plugin must be in it's own folder and contain a package.json file and/or an index.js file.

Example

const ConduitPlugin = require('conduit-plugin');

class MyCustomPlugin extends ConduitPlugin {
	constructor(server) {
		super(server);
	}

	onInitialized() {
		console.log('This message is from a plugin. I have hooked the `initialized` event handle! I run BEFORE the base plugin');
	}

	onBeforeChat(event) {
		event.getSender()
			.sendMessage('This message is sent via a plugin using `onBeforeChat`. This event runs before the chat packet is handled internally or by other plugins');
	}
}

module.exports = MyCustomPlugin;

Plugin API

The plugin API docs can be found in the Wiki

FAQs

Package last updated on 10 Oct 2019

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