remove config save, its unnecessary

This commit is contained in:
Evert Prants 2021-10-02 12:33:51 +03:00
parent 265bdef5a5
commit 34f1f48c45
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,7 @@
"main": "plugin.js", "main": "plugin.js",
"name": "discord", "name": "discord",
"description": "Discord Service for Squeebot 3", "description": "Discord Service for Squeebot 3",
"version": "1.2.2", "version": "1.2.3",
"tags": ["service", "discord"], "tags": ["service", "discord"],
"dependencies": ["control?"], "dependencies": ["control?"],
"npmDependencies": ["discord.js@^13.1.0"] "npmDependencies": ["discord.js@^13.1.0"]

View File

@ -407,9 +407,8 @@ class DiscordServicePlugin extends Plugin {
@EventListener('pluginUnload') @EventListener('pluginUnload')
public unloadEventHandler(plugin: string | Plugin): void { public unloadEventHandler(plugin: string | Plugin): void {
if (plugin === this.name || plugin === this) { if (plugin === this.name || plugin === this) {
this.config.save().then(() => this.service?.stopAll().then(() =>
this.service?.stopAll().then(() => this.emit('pluginUnloaded', this));
this.emit('pluginUnloaded', this)));
} }
} }
} }

View File

@ -3,7 +3,7 @@
"plugins": [ "plugins": [
{ {
"name": "discord", "name": "discord",
"version": "1.2.2" "version": "1.2.3"
} }
], ],
"typescript": true "typescript": true