revert code

This commit is contained in:
2025-09-20 17:05:55 -05:00
parent db8d363b6a
commit 194328fcea
3 changed files with 21 additions and 33 deletions

View File

@@ -97,28 +97,3 @@ export async function clearGlobalCommands(): Promise<void> {
}
}
export async function patchMessageWithDisplay(channelId: string, messageId: string, data: any): Promise<void> {
try {
// Validación mínima para ayudar a depurar
const dbg = {
hasDisplay: !!data?.display,
displayType: data?.display?.type,
compCount: Array.isArray(data?.display?.components) ? data.display.components.length : undefined,
hasComponents: Array.isArray(data?.components),
};
// eslint-disable-next-line no-console
if (!dbg.hasDisplay) console.warn('[patchMessageWithDisplay] Enviando PATCH sin display. data.keys=', Object.keys(data || {}));
await rest.patch(Routes.channelMessage(channelId, messageId), { body: data });
} catch (error: any) {
// eslint-disable-next-line no-console
console.error('[patchMessageWithDisplay] Error PATCH mensaje', {
channelId,
messageId,
status: error?.status,
code: error?.code,
message: error?.message,
rawError: error?.rawError,
});
throw error;
}
}