mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Fix fix-portal-channels
This commit is contained in:
@@ -4,6 +4,7 @@ module.exports = class FixPortalChannelsCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'fix-portal-channels',
|
name: 'fix-portal-channels',
|
||||||
|
aliases: ['fix-portals'],
|
||||||
group: 'portal',
|
group: 'portal',
|
||||||
memberName: 'fix-portal-channels',
|
memberName: 'fix-portal-channels',
|
||||||
description: 'Removes no longer existent channels from the portal list.',
|
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);
|
channels.splice(channels.indexOf(channel), 1);
|
||||||
count++;
|
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.`);
|
return msg.say(`Cleared **${count}** channels from the portal list.`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "66.5.0",
|
"version": "66.5.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user