import {Request, Response, NextFunction } from "express"; const API_ENDPOINT = "https://discordapp.com/api"; export async function get(req : Request, res : Response, next : NextFunction) { const CALLBACK_URL = encodeURIComponent(`${process.env.ADMIN_URL}/login/discord/callback`); const SCOPE = encodeURIComponent("identify"); res.redirect(`${API_ENDPOINT}/oauth2/authorize?client_id=${process.env.BOT_CLIENT_ID}&scope=${SCOPE}&response_type=code&redirect_uri=${CALLBACK_URL}`); };