completionId: cgen-81612eb48679441d904b8c115577f190

cgen-81612eb48679441d904b8c115577f190
This commit is contained in:
Builder.io 2025-11-08 22:11:01 +00:00
parent ddaa9990af
commit 3fbf3f0087

View file

@ -993,6 +993,7 @@ export function createServer() {
}
const result = await response.json();
console.log("[Discord] Commands registered successfully:", result.length);
res.setHeader("Content-Type", "application/json");
return res.json({
ok: true,
@ -1000,10 +1001,11 @@ export function createServer() {
commands: result,
});
} catch (e: any) {
console.error("[Discord] Exception registering commands:", e);
console.error("[Discord] Exception registering commands:", e.message, e.stack);
res.setHeader("Content-Type", "application/json");
return res.status(500).json({
error: e?.message || "Failed to register commands",
details: process.env.NODE_ENV === "development" ? e?.stack : undefined,
});
}
});