diff --git a/api/sync-docs-gitbook.ts b/api/sync-docs-gitbook.ts index a395eccb..8f5cd63d 100644 --- a/api/sync-docs-gitbook.ts +++ b/api/sync-docs-gitbook.ts @@ -8,7 +8,7 @@ const GITBOOK_SPACE_ID = process.env.GITBOOK_SPACE_ID; // Validate environment variables if (!GITBOOK_API_TOKEN || !GITBOOK_SPACE_ID) { throw new Error( - "Missing required environment variables: GITBOOK_API_TOKEN and GITBOOK_SPACE_ID" + "Missing required environment variables: GITBOOK_API_TOKEN and GITBOOK_SPACE_ID", ); } diff --git a/client/components/admin/AdminDiscordManagement.tsx b/client/components/admin/AdminDiscordManagement.tsx index c29c81f3..6ccc9b01 100644 --- a/client/components/admin/AdminDiscordManagement.tsx +++ b/client/components/admin/AdminDiscordManagement.tsx @@ -219,14 +219,20 @@ export function AdminDiscordManagement() { placeholder="Discord Server ID" value={newMapping.server_id} onChange={(e) => - setNewMapping({ ...newMapping, server_id: e.target.value }) + setNewMapping({ + ...newMapping, + server_id: e.target.value, + }) } className="w-full mt-1 bg-gray-800 border border-purple-500/30 rounded px-3 py-2 text-white focus:outline-none focus:border-purple-500" /> - @@ -295,13 +301,16 @@ export function AdminDiscordManagement() { {/* Delete Confirmation */} - !open && setDeleteId(null)}> + !open && setDeleteId(null)} + > Delete Role Mapping? - This role mapping will be permanently deleted. Users will no longer - receive this role when setting this arm. + This role mapping will be permanently deleted. Users will no + longer receive this role when setting this arm. Cancel diff --git a/client/pages/Admin.tsx b/client/pages/Admin.tsx index 4c2b0261..ed6742bd 100644 --- a/client/pages/Admin.tsx +++ b/client/pages/Admin.tsx @@ -96,7 +96,7 @@ export default function Admin() { }, [user, loading, navigate]); const [managedProfiles, setManagedProfiles] = useState( - [] + [], ); const [studios, setStudios] = useState([ { @@ -161,7 +161,7 @@ export default function Admin() { setProjectApplicationsLoading(true); try { const response = await fetch( - `/api/applications?owner=${encodeURIComponent(user.id)}` + `/api/applications?owner=${encodeURIComponent(user.id)}`, ); if (response.ok) { const data = await response.json(); @@ -187,7 +187,7 @@ export default function Admin() { setOpportunityApplicationsLoading(true); try { const response = await fetch( - `/api/opportunities/applications?email=${encodeURIComponent(email)}` + `/api/opportunities/applications?email=${encodeURIComponent(email)}`, ); if (response.ok) { const data = await response.json(); @@ -280,7 +280,7 @@ export default function Admin() { () => managedProfiles.find((profile) => profile.id === selectedMemberId) ?? null, - [managedProfiles, selectedMemberId] + [managedProfiles, selectedMemberId], ); const totalMembers = managedProfiles.length; diff --git a/discord-bot/DEPLOYMENT_GUIDE.md b/discord-bot/DEPLOYMENT_GUIDE.md index ee1a158c..c90a3aaf 100644 --- a/discord-bot/DEPLOYMENT_GUIDE.md +++ b/discord-bot/DEPLOYMENT_GUIDE.md @@ -50,6 +50,7 @@ NODE_ENV=production ``` **Note:** Get these values from: + - Discord Developer Portal: Applications → Your Bot → Token & General Information - Supabase Dashboard: Project Settings → API diff --git a/discord-bot/bot.js b/discord-bot/bot.js index 4415c0cf..58837744 100644 --- a/discord-bot/bot.js +++ b/discord-bot/bot.js @@ -23,7 +23,7 @@ const missingVars = requiredEnvVars.filter((envVar) => !process.env[envVar]); if (missingVars.length > 0) { console.error( "❌ FATAL ERROR: Missing required environment variables:", - missingVars.join(", ") + missingVars.join(", "), ); console.error("\nPlease set these in your Discloud/hosting environment:"); missingVars.forEach((envVar) => { @@ -128,7 +128,7 @@ async function registerCommands() { // Handle Entry Point command conflict (Discord Activity) if (error.code === 50240) { console.warn( - "⚠️ Entry Point command detected (Discord Activity). Attempting to register without bulk update..." + "⚠️ Entry Point command detected (Discord Activity). Attempting to register without bulk update...", ); // Post commands individually to avoid bulk update conflicts for (const command of commands) { @@ -137,7 +137,9 @@ async function registerCommands() { { body: command }, ); } - console.log(`✅ Successfully registered ${commands.length} slash commands (individual).`); + console.log( + `✅ Successfully registered ${commands.length} slash commands (individual).`, + ); } else { throw error; } diff --git a/discord-bot/utils/roleManager.js b/discord-bot/utils/roleManager.js index 7c9f55ca..27be439c 100644 --- a/discord-bot/utils/roleManager.js +++ b/discord-bot/utils/roleManager.js @@ -31,7 +31,9 @@ async function assignRoleByArm(guild, discordId, arm, supabase) { } if (!mapping) { - console.warn(`No role mapping found for arm: ${arm} in server: ${guild.id}`); + console.warn( + `No role mapping found for arm: ${arm} in server: ${guild.id}`, + ); return false; }