auth stuff

This commit is contained in:
Erik 2022-06-13 13:05:05 +03:00
parent 3c7a80651d
commit 90c659858c
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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