core request must come before starting plugins

This commit is contained in:
Evert Prants 2021-10-02 12:11:26 +03:00
parent 1ec3870ad7
commit 43d33a5937
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@squeebot/cli",
"version": "3.4.0",
"version": "3.4.1",
"description": "Squeebot v3 runtime, environments and configuration",
"main": "dist/squeebot.js",
"bin": {
@ -29,7 +29,7 @@
"typescript": "^4.4.2"
},
"dependencies": {
"@squeebot/core": "^3.3.3",
"@squeebot/core": "^3.3.4",
"fs-extra": "^10.0.0",
"node-watch": "^0.7.1",
"tar": "^6.1.11",

View File

@ -74,14 +74,14 @@ export class Squeebot implements ISqueebotCore {
// Start channels
this.channelManager.initialize(this.config.get('channels'));
if (autostart) {
// Start enabled plugins
await this.startPlugins();
}
// Send core on request
this.stream.on('core', 'request-core', (pl: string) =>
this.stream.emitTo(pl, 'core', this));
// Start enabled plugins
if (autostart) {
await this.startPlugins();
}
}
public async startPlugins(): Promise<void> {