GithubHelp home page GithubHelp logo

unifier-plugin's Introduction

Unifier plugin template

This is a template repository you can use to write plugins for Unifier.

Note

Once you have read through everything below and know what you're doing, you're free to replace this README file with whatever you want.

plugin.json

plugin.json contains the metadata of your plugin, such as the plugin ID, name, etc. Unifier will read this file on boot, so it knows which files to load to load your plugin.

Below are the list of values you may have in your plugin.json file. Unless otherwise stated, all keys are compatible with Unifier v1.2.0 (release 36) and newer.

id

Plugin ID. Unifier uses this as the identifier for your plugin, and no plugin installed to your bot may have the same ID. Users will need to specify the ID as the plugin when running install, uninstall, and upgrade for plugins.

name

Plugin name. Unlike plugin IDs, this can be whatever you desire.

description

Plugin description. Describe what your plugin does here.

version

Plugin version. We recommend you follow semantic versioning for this.

release

Plugin release number. Unifier will use this to tell if the plugin is up to date or not.

minimum

The minimum Unifier release required to use your plugin.

services (v1.2.3+/rel43+)

Warning

We haven't documented this yet, but we will in the near future.

Services your plugin will provide. Instance owners will need to review and allow services in order for the plugin to be installed. Services include:

  • content_protection: Plugin provides content filtering. Grants access to message content and moderation actions.
  • content_processing: Plugin provides content processing (e.g. message stylizing). Grants access to message content.

Warning

If services is not empty, you will need to have a file called [plugin_id]_[service].py that provides the service, and it should be added in utils.

requirements (v1.2.0-patch2+/rel38+)

Dependencies the plugin needs other than the ones in Unifier's requirements.txt file.

shutdown

If your plugin needs special code being ran before being unloaded, set this to true.

Warning

If this is true, your plugin will not be able to be unloaded without a [plugin_id]_check.py file. You will need to specify this in the utils key.

modules

Plugin modules. All files in here will be loaded as an extension when loading the plugin.

utils

Plugin utility scripts. If shutdown is true, you must have [plugin_id]_check.py in here.


Examples

Need an example to know what you need to have in your repository? You might want to check out unifier-revolt.

Installing plugins

To install a plugin, run the install <repo_url> command. This will install a plugin from the Git repository you specified.

Licensing

As Unifier is AGPLv3 licensed, your plugin must be licensed AGPLv3 as well.

unifier-plugin's People

Contributors

greeeen-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.