From 90c659858cfa62a8e839390354a4470c20cbe2ab Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 13 Jun 2022 13:05:05 +0300 Subject: [PATCH] auth stuff --- src/structure/components/commands/administration/Import.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/components/commands/administration/Import.js b/src/structure/components/commands/administration/Import.js index 88876f7..c4fce86 100644 --- a/src/structure/components/commands/administration/Import.js +++ b/src/structure/components/commands/administration/Import.js @@ -56,7 +56,7 @@ class ImportCommand extends SlashCommand { version = version?.value || '3'; await invoker.reply({ index: 'COMMAND_IMPORT_WORKING', emoji: 'loading' }); - const result = await this[subcommand.name](guild, version, overwrite.value); + const result = await this[subcommand.name](guild, version, overwrite?.value); // This looks ridiculous but it's to keep track of what's been imported settings = guild._settings; @@ -72,7 +72,7 @@ class ImportCommand extends SlashCommand { const migrator = new InfractionMigrator(this.client, guild, { host: version === '2' ? MONGODB_V2_HOST : MONGODB_HOST, - username: MONGODB_USERNAME, + username: version === '2' ? null : MONGODB_USERNAME, password: MONGODB_PASSWORD, database: dbs[version], // Default to v3 version @@ -113,7 +113,7 @@ class ImportCommand extends SlashCommand { // const { MONGODB_HOST, MONGODB_USERNAME, MONGODB_PASSWORD } = process.env; const migrator = new SettingsMigrator(this.client, guild, { host: version === '2' ? MONGODB_V2_HOST : MONGODB_HOST, - username: MONGODB_USERNAME, + username: version === '2' ? null : MONGODB_USERNAME, password: MONGODB_PASSWORD, database: dbs[version], // Default to v3 version