core request must come before starting plugins
This commit is contained in:
parent
1ec3870ad7
commit
43d33a5937
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@squeebot/cli",
|
"name": "@squeebot/cli",
|
||||||
"version": "3.4.0",
|
"version": "3.4.1",
|
||||||
"description": "Squeebot v3 runtime, environments and configuration",
|
"description": "Squeebot v3 runtime, environments and configuration",
|
||||||
"main": "dist/squeebot.js",
|
"main": "dist/squeebot.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -29,7 +29,7 @@
|
|||||||
"typescript": "^4.4.2"
|
"typescript": "^4.4.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@squeebot/core": "^3.3.3",
|
"@squeebot/core": "^3.3.4",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"node-watch": "^0.7.1",
|
"node-watch": "^0.7.1",
|
||||||
"tar": "^6.1.11",
|
"tar": "^6.1.11",
|
||||||
|
10
src/core.ts
10
src/core.ts
@ -74,14 +74,14 @@ export class Squeebot implements ISqueebotCore {
|
|||||||
// Start channels
|
// Start channels
|
||||||
this.channelManager.initialize(this.config.get('channels'));
|
this.channelManager.initialize(this.config.get('channels'));
|
||||||
|
|
||||||
if (autostart) {
|
|
||||||
// Start enabled plugins
|
|
||||||
await this.startPlugins();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send core on request
|
// Send core on request
|
||||||
this.stream.on('core', 'request-core', (pl: string) =>
|
this.stream.on('core', 'request-core', (pl: string) =>
|
||||||
this.stream.emitTo(pl, 'core', this));
|
this.stream.emitTo(pl, 'core', this));
|
||||||
|
|
||||||
|
// Start enabled plugins
|
||||||
|
if (autostart) {
|
||||||
|
await this.startPlugins();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async startPlugins(): Promise<void> {
|
public async startPlugins(): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user