Allow plugins to access the 'threads' module for creating new threads

cshd
Dragory 2020-10-12 20:00:25 +03:00
parent a3c1ed0a28
commit f5caa80c4c
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ const express = require("express");
const { CommandManager } = require("knub-command-manager"); const { CommandManager } = require("knub-command-manager");
const { Client } = require("eris"); const { Client } = require("eris");
const Knex = require("knex"); const Knex = require("knex");
const threads = require("./data/threads");
/** /**
* @typedef {object} PluginAPI * @typedef {object} PluginAPI
@ -14,6 +15,7 @@ const Knex = require("knex");
* @property {PluginHooksAPI} hooks * @property {PluginHooksAPI} hooks
* @property {FormattersExport} formats * @property {FormattersExport} formats
* @property {express.Application} webserver * @property {express.Application} webserver
* @property {threads} threads
*/ */
/** /**

View File

@ -7,6 +7,7 @@ const { server: webserver } = require("./modules/webserver");
const childProcess = require("child_process"); const childProcess = require("child_process");
const pacote = require("pacote"); const pacote = require("pacote");
const path = require("path"); const path = require("path");
const threads = require("./data/threads");
const pluginSources = { const pluginSources = {
npm: { npm: {
@ -128,6 +129,7 @@ module.exports = {
}, },
formats, formats,
webserver, webserver,
threads,
}; };
}, },
}; };