Migration

This commit is contained in:
2026-05-14 21:33:18 +02:00
parent f56e6079e6
commit 4853da05a9
3 changed files with 25 additions and 1 deletions
+2
View File
@@ -8,6 +8,7 @@ process.on("uncaughtException", (err) => {
console.error("Uncaught exception:", err);
});
import { openDatabase } from "./db/db.js";
import { initializeSchema } from "./db/init.js";
import type { BotStateRow } from "./db/schema.js";
import { loadStrings, makeT } from "./i18n/strings.js";
import { TTSRegistry } from "./tts/registry.js";
@@ -32,6 +33,7 @@ client.on(Events.Error, (err) => console.error("Discord client error:", err));
client.on(Events.Warn, (msg) => console.warn("Discord client warning:", msg));
const db = await openDatabase(config.DB_FILE);
await initializeSchema(db);
const savedEngine = await db.get<BotStateRow>(
"select value from BotState where key='announcement_engine'",
);