error messages

This commit is contained in:
Erik 2022-04-25 15:16:13 +03:00
parent b3ad640db8
commit 3966da0303
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 14 additions and 2 deletions

View File

@ -83,3 +83,10 @@ The commands `{alreadyDisabled}` were already disabled.
// Settings // Settings
[COMMAND_MODERATION_HELP] [COMMAND_MODERATION_HELP]
Configure moderation related settings. 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}

View File

@ -50,7 +50,12 @@ class ImportCommand extends SlashCommand {
version version
}); });
await migrator.connect(); 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(imported);
console.log(settings); console.log(settings);
} }