remove config save, its unnecessary

This commit is contained in:
Evert Prants 2021-10-02 12:35:06 +03:00
parent 5ad6352a83
commit 216108cf1b
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
7 changed files with 9 additions and 11 deletions

View File

@ -3,7 +3,7 @@
"name": "permissions", "name": "permissions",
"description": "Official permissions system for commands", "description": "Official permissions system for commands",
"tags": ["api", "permissions"], "tags": ["api", "permissions"],
"version": "0.1.0", "version": "0.1.1",
"dependencies": ["control?"], "dependencies": ["control?"],
"npmDependencies": [] "npmDependencies": []
} }

View File

@ -113,8 +113,7 @@ class PermissionsPlugin extends Plugin {
unloadEventHandler(plugin: string | Plugin): void { unloadEventHandler(plugin: string | Plugin): void {
if (plugin === this.name || plugin === this) { if (plugin === this.name || plugin === this) {
logger.debug('[%s]', this.name, 'shutting down..'); logger.debug('[%s]', this.name, 'shutting down..');
this.config.save().then(() => this.emit('pluginUnloaded', this);
this.emit('pluginUnloaded', this));
} }
} }

View File

@ -3,7 +3,7 @@
"name": "simplecommands", "name": "simplecommands",
"description": "Official Simplistic Commands API for Squeebot 3", "description": "Official Simplistic Commands API for Squeebot 3",
"tags": ["handler", "commands", "api"], "tags": ["handler", "commands", "api"],
"version": "1.1.1", "version": "1.1.2",
"dependencies": ["control?", "permissions?"], "dependencies": ["control?", "permissions?"],
"npmDependencies": [] "npmDependencies": []
} }

View File

@ -523,8 +523,7 @@ class SqueebotCommandsAPIPlugin extends Plugin {
unloadEventHandler(plugin: string | Plugin): void { unloadEventHandler(plugin: string | Plugin): void {
if (plugin === this.name || plugin === this) { if (plugin === this.name || plugin === this) {
logger.debug('[%s] shutting down..', this.name); logger.debug('[%s] shutting down..', this.name);
this.config.save().then(() => this.emit('pluginUnloaded', this);
this.emit('pluginUnloaded', this));
} }
} }

View File

@ -11,15 +11,15 @@
}, },
{ {
"name": "permissions", "name": "permissions",
"version": "0.1.0" "version": "0.1.1"
}, },
{ {
"name": "simplecommands", "name": "simplecommands",
"version": "1.1.1" "version": "1.1.2"
}, },
{ {
"name": "xprotocol", "name": "xprotocol",
"version": "1.0.0" "version": "1.0.1"
} }
], ],
"typescript": true "typescript": true

View File

@ -3,7 +3,7 @@
"name": "xprotocol", "name": "xprotocol",
"description": "API for sending messages to other protocols", "description": "API for sending messages to other protocols",
"tags": ["messages", "relaying", "api"], "tags": ["messages", "relaying", "api"],
"version": "1.0.0", "version": "1.0.1",
"dependencies": ["control?"], "dependencies": ["control?"],
"npmDependencies": [] "npmDependencies": []
} }

View File

@ -46,7 +46,7 @@ class XProtocolPlugin extends Plugin {
this.on('send', (data: any[]) => { this.on('send', (data: any[]) => {
const target = data[0]; const target = data[0];
this.sendTo(target, ...data.slice(1)).catch((error: Error) => { this.sendTo(target, ...data.slice(1)).catch((error: Error) => {
logger.error(`[sendto] Sending to protocol from event failed:`, error.message ?? error); logger.error(`[xprotocol] Sending to protocol from event failed:`, error.message ?? error);
}); });
}); });
} }