From 3dcb7f9812a495364e978a3fd78fee7a57c13f5a Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 27 Feb 2018 00:44:52 +0000 Subject: [PATCH] Fix fix-portal-channels --- commands/portal/fix-portal-channels.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/portal/fix-portal-channels.js b/commands/portal/fix-portal-channels.js index d809cd36..a6bfca3e 100644 --- a/commands/portal/fix-portal-channels.js +++ b/commands/portal/fix-portal-channels.js @@ -4,6 +4,7 @@ module.exports = class FixPortalChannelsCommand extends Command { constructor(client) { super(client, { name: 'fix-portal-channels', + aliases: ['fix-portals'], group: 'portal', memberName: 'fix-portal-channels', description: 'Removes no longer existent channels from the portal list.', @@ -19,6 +20,8 @@ module.exports = class FixPortalChannelsCommand extends Command { channels.splice(channels.indexOf(channel), 1); count++; } + if (!channels.length) this.client.provider.remove('global', 'portals'); + else this.client.provider.set('global', 'portals', channels); return msg.say(`Cleared **${count}** channels from the portal list.`); } }; diff --git a/package.json b/package.json index c9f39da4..8e80f7bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "66.5.0", + "version": "66.5.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {