diff --git a/src/localization/en_gb/commands/en_gb_administration.lang b/src/localization/en_gb/commands/en_gb_administration.lang index 4d52daf..3cb0860 100644 --- a/src/localization/en_gb/commands/en_gb_administration.lang +++ b/src/localization/en_gb/commands/en_gb_administration.lang @@ -82,4 +82,11 @@ The commands `{alreadyDisabled}` were already disabled. // Settings [COMMAND_MODERATION_HELP] -Configure moderation related settings. \ No newline at end of file +Configure moderation related settings. + +[COMMAND_IMPORT_HELP] +Import configuration and data from old versions of the bot. + +[COMMAND_IMPORT_ERROR] +Error during import, contact a developer about this issue: +{message} \ No newline at end of file diff --git a/src/structure/components/commands/administration/Import.js b/src/structure/components/commands/administration/Import.js index 6ac9b46..4858e89 100644 --- a/src/structure/components/commands/administration/Import.js +++ b/src/structure/components/commands/administration/Import.js @@ -50,7 +50,12 @@ class ImportCommand extends SlashCommand { version }); await migrator.connect(); - const imported = await migrator.migrate(); + let imported = null; + try { + imported = await migrator.migrate(); + } catch (err) { + return { index: 'COMMAND_IMPORT_ERROR', params: { message: err.message }, emoji: 'failure' }; + } console.log(imported); console.log(settings); }