fix legacy code #2

This commit is contained in:
2026-01-04 02:38:34 +05:30
parent f7859d7e0a
commit 1db2bc99e4
2 changed files with 26 additions and 13 deletions

View File

@@ -108,10 +108,8 @@ export async function checkBetaServer(guildIds: string[]): Promise<boolean[]> {
if (safeGuildIds.length === 0) return guildIds.map(() => false);
// Manually construct JSON to preserve u64 precision (native JS numbers lose precision > 2^53)
// We want: { "guild_ids": [123, 456] }
// checkBotMembership also does this manual construction for the same reason.
const body = `{"guild_ids": [${safeGuildIds.join(",")}]}`;
// Use JSON.stringify which matches the backend expectation of strings
const body = JSON.stringify({ guild_ids: guildIds });
const response = await fetch(`${process.env.BOT_API_URL}/api/is_beta_server`, {
method: "POST",