error messages
This commit is contained in:
parent
b3ad640db8
commit
3966da0303
@ -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}
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user