From 2cdb406e1c2bb855da104bf1797d009232dbc553 Mon Sep 17 00:00:00 2001 From: cirroskais Date: Mon, 18 Mar 2024 15:22:22 -0400 Subject: [PATCH] w --- src/App.svelte | 2 +- src/lib/discord.js | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 1500709..73c89ad 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,7 +4,7 @@ let output = ""; async function main() { - const auth = await authorize(); + const auth = await authorize().catch((e) => e); output = output + `auth: ${JSON.stringify(auth)}\n`; if (!auth) return (output += `failed to authenticate :'c`); diff --git a/src/lib/discord.js b/src/lib/discord.js index df38262..678c47c 100644 --- a/src/lib/discord.js +++ b/src/lib/discord.js @@ -11,7 +11,27 @@ export async function authorize() { response_type: "code", state: "", prompt: "none", - scope: ["identify", "rpc.activities.write"], + scope: [ + // "applications.builds.upload", + // "applications.builds.read", + // "applications.store.update", + // "applications.entitlements", + // "bot", + "identify", + // "connections", + // "email", + // "gdm.join", + "guilds", + // "guilds.join", + // "guilds.members.read", + // "messages.read", + // "relationships.read", + "rpc.activities.write", + // "rpc.notifications.read", + // "rpc.voice.write", + "rpc.voice.read", + // "webhook.incoming", + ], }); const response = await fetch("/api/token", {