From d3a2c6f2c24d936cfe6e60789046e6321288a08c Mon Sep 17 00:00:00 2001 From: masterhc Date: Fri, 8 Mar 2024 22:29:16 +0000 Subject: [PATCH] Fix authmaker: Swap tokentype with token --- lib.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib.js b/lib.js index fe912e7..954e97f 100644 --- a/lib.js +++ b/lib.js @@ -1336,7 +1336,6 @@ exports.DiscordAPI = class DiscordAPI } async getUser () { - return await fetch('https://discord.com/api/users/@me', { headers: { @@ -1474,8 +1473,8 @@ exports.DiscordAPI = class DiscordAPI AuthStringMaker(cookieString) { const splitCookie = cookieString.split('; '); - const tokenType = splitCookie[1].split('=')[1]; - const accessToken = splitCookie[0].split('=')[1]; + const tokenType = splitCookie[0].split('=')[1]; + const accessToken = splitCookie[1].split('=')[1]; return `${tokenType} ${accessToken}` } /**