mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
hotfix
This commit is contained in:
1 parent
e966b6ce20
commit
db0ca569ee
9 files changed
+426
-42
No files matched your search
@@ -4,11 +4,15 @@ import { logger } from "../src/constants/Logger.mjs";
|
||||
|
||||
const config = JSON.parse(fs.readFileSync(new URL("../config.json", import.meta.url)));
|
||||
|
||||
// Pass bot ID from config if available, so migrations are bot-isolated.
|
||||
// If no botId in config, all rows are migrated (legacy behavior).
|
||||
const botId = config.botId ?? null;
|
||||
|
||||
// Both source and destination use RemoteSettingsManager to ensure the
|
||||
// `guilds` Map is populated from MySQL. The abstract SettingsManager base
|
||||
// class has no implementation (no guilds, no load, no defaults).
|
||||
const sm = new RemoteSettingsManager(config.mysql, "./storage/defaults.json");
|
||||
const rsm = new RemoteSettingsManager(config.mysql, "./storage/defaults.json");
|
||||
const sm = new RemoteSettingsManager(config.mysql, "./storage/defaults.json", botId);
|
||||
const rsm = new RemoteSettingsManager(config.mysql, "./storage/defaults.json", botId);
|
||||
|
||||
// Ensure source manager is fully loaded BEFORE starting migration.
|
||||
// Previously, rsm's "ready" could fire before sm finished loading,
|
||||
|
||||
Reference in new issue
Block a user