From d321886f17cc1b4cbd75b1bdcc28726294cfbe96 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 10 May 2022 00:09:47 +0300 Subject: [PATCH] import for staff ping setting --- src/structure/interfaces/commands/SlashCommand.js | 2 +- src/utilities/SettingsMigrator.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/structure/interfaces/commands/SlashCommand.js b/src/structure/interfaces/commands/SlashCommand.js index ad773d3..6b39bfd 100644 --- a/src/structure/interfaces/commands/SlashCommand.js +++ b/src/structure/interfaces/commands/SlashCommand.js @@ -35,7 +35,7 @@ class SlashCommand extends Command { this.type = Object.keys(CommandsConstant.ApplicationCommandTypes).includes(options.type) ? options.type : 'CHAT_INPUT'; // this.options = options.options || []; - this.defaultPermission = options.defaultPermission || true; + // this.defaultPermission = options.defaultPermission || true; } diff --git a/src/utilities/SettingsMigrator.js b/src/utilities/SettingsMigrator.js index 8f0e524..5423517 100644 --- a/src/utilities/SettingsMigrator.js +++ b/src/utilities/SettingsMigrator.js @@ -212,6 +212,14 @@ class SettingsMigrator { userlogs, grantable, privatelog, linkfilter, autorole, welcomer, prefix, protection } = result; const settings = this.client.defaultConfig('GUILD'); + if (staffRole || staffRole) { + settings.staff = { + rule: staffRule, + role: staffRole, + enabled: Boolean(staffRole) + }; + } + if (moderation || modlogs) settings.moderation = { channel: result.modlogs || null,