feat: add runtime patch for ModalSubmitInteraction to prevent crashes during member resolution
This commit is contained in:
@@ -9,6 +9,7 @@ import {memoryOptimizer} from "./core/memory/memoryOptimizer";
|
||||
import { startReminderPoller } from "./core/api/reminders";
|
||||
import { ensureRemindersSchema } from "./core/api/remindersSchema";
|
||||
import logger from "./core/lib/logger";
|
||||
import { applyModalSubmitInteractionPatch } from "./core/patches/discordModalPatch";
|
||||
|
||||
// Activar monitor de memoria si se define la variable
|
||||
const __memInt = parseInt(process.env.MEMORY_LOG_INTERVAL_SECONDS || '0', 10);
|
||||
@@ -21,6 +22,13 @@ if (process.env.ENABLE_MEMORY_OPTIMIZER === 'true') {
|
||||
memoryOptimizer.start();
|
||||
}
|
||||
|
||||
// Apply safety patch for ModalSubmitInteraction members resolution before anything else
|
||||
try {
|
||||
applyModalSubmitInteractionPatch();
|
||||
} catch (e) {
|
||||
logger.warn({ err: e }, 'No se pudo aplicar el patch de ModalSubmitInteraction');
|
||||
}
|
||||
|
||||
export const bot = new Amayo();
|
||||
|
||||
// Listeners de robustez del cliente Discord
|
||||
|
||||
Reference in New Issue
Block a user