Database import

This commit is contained in:
Artyom Ashirov
2024-11-16 20:55:47 +03:00
parent e3f2e87fcc
commit b45aa35527
4 changed files with 383 additions and 4 deletions

View File

@@ -107,6 +107,11 @@ bot.on('message', async (msg) => {
return;
}
// Check for database dump import
if (await adminDumpHandler.handleDumpImport(msg)) {
return;
}
logDebug(msg.text, 'handleMessage');
switch (msg.text) {
@@ -339,8 +344,10 @@ bot.on('callback_query', async (callbackQuery) => {
}
// Dump manage
else if (action === "export_database") {
await adminDumpHandler.exportDatabase(callbackQuery);
await adminDumpHandler.handleExportDatabase(callbackQuery);
return;
} else if (action === "import_database") {
await adminDumpHandler.handleImportDatabase(callbackQuery);
}
await bot.answerCallbackQuery(callbackQuery.id);