Enhance Discord integration by adding optional bot permissions in environment files and updating the dashboard to include an "Add Bot to your Server" button. Refactor authentication logic to handle token refresh and improve error handling for Discord sessions. Update placeholder text for better clarity in the search input field.
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 8s

This commit is contained in:
TheOnlyMace
2026-07-21 22:19:13 +02:00
parent 8294c1b4f7
commit 9006b06c09
10 changed files with 229 additions and 59 deletions

View File

@@ -0,0 +1,33 @@
/**
* ╔══════════════════════════════════════════════════════════════════╗
* ║ ║
* ║ +-+-+-+-+-+-+-+-+ ║
* ║ |H|e|x|a|H|o|s|t| ║
* ║ +-+-+-+-+-+-+-+-+ ║
* ║ ║
* ║ © 2026 HexaHost — All Rights Reserved ║
* ║ ║
* ║ discord ── https://discord.gg/hexahost ║
* ║ github ── https://github.com/theoneandonlymace ║
* ║ ║
* ╚══════════════════════════════════════════════════════════════════╝
*/
import { NextResponse } from "next/server";
import { getBotInviteUrl } from "@/lib/discord-invite";
export const dynamic = "force-dynamic";
/** Redirects to the Discord bot invite (uses DISCORD_CLIENT_ID at runtime). */
export async function GET() {
const url = getBotInviteUrl();
if (!url) {
return NextResponse.json(
{
detail:
"DISCORD_CLIENT_ID is not configured. Set it in the dashboard environment.",
},
{ status: 503 }
);
}
return NextResponse.redirect(url, 302);
}