completionId: cgen-81612eb48679441d904b8c115577f190
cgen-81612eb48679441d904b8c115577f190
This commit is contained in:
parent
ddaa9990af
commit
3fbf3f0087
1 changed files with 3 additions and 1 deletions
|
|
@ -993,6 +993,7 @@ export function createServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
console.log("[Discord] Commands registered successfully:", result.length);
|
||||||
res.setHeader("Content-Type", "application/json");
|
res.setHeader("Content-Type", "application/json");
|
||||||
return res.json({
|
return res.json({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|
@ -1000,10 +1001,11 @@ export function createServer() {
|
||||||
commands: result,
|
commands: result,
|
||||||
});
|
});
|
||||||
} catch (e: any) {
|
} 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");
|
res.setHeader("Content-Type", "application/json");
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
error: e?.message || "Failed to register commands",
|
error: e?.message || "Failed to register commands",
|
||||||
|
details: process.env.NODE_ENV === "development" ? e?.stack : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue