import command
This commit is contained in:
parent
bd8d5f1ca2
commit
376f2d75ac
@ -89,4 +89,7 @@ Import configuration and data from old versions of the bot.
|
|||||||
|
|
||||||
[COMMAND_IMPORT_ERROR]
|
[COMMAND_IMPORT_ERROR]
|
||||||
Error during import, contact a developer about this issue:
|
Error during import, contact a developer about this issue:
|
||||||
{message}
|
{message}
|
||||||
|
|
||||||
|
[COMMAND_IMPORT_SUCCESS]
|
||||||
|
Successfully imported settings!
|
@ -49,6 +49,7 @@ class ImportCommand extends SlashCommand {
|
|||||||
database: dbs[version], // Default to v3
|
database: dbs[version], // Default to v3
|
||||||
version
|
version
|
||||||
});
|
});
|
||||||
|
|
||||||
await migrator.connect();
|
await migrator.connect();
|
||||||
let imported = null;
|
let imported = null;
|
||||||
try {
|
try {
|
||||||
@ -56,8 +57,9 @@ class ImportCommand extends SlashCommand {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
return { index: 'COMMAND_IMPORT_ERROR', params: { message: err.message }, emoji: 'failure' };
|
return { index: 'COMMAND_IMPORT_ERROR', params: { message: err.message }, emoji: 'failure' };
|
||||||
}
|
}
|
||||||
console.log(imported);
|
|
||||||
console.log(settings);
|
await guild.updateSettings(imported);
|
||||||
|
return { index: 'COMMAND_IMPORT_SUCCESS', emoji: 'success' };
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user