core request must come before starting plugins
This commit is contained in:
parent
1ec3870ad7
commit
43d33a5937
@ -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",
|
||||
|
10
src/core.ts
10
src/core.ts
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user