Fix authmaker: Swap tokentype with token

master
masterhc 1 year ago
parent b9c7e60ac1
commit d3a2c6f2c2

@ -1336,7 +1336,6 @@ exports.DiscordAPI = class DiscordAPI
} }
async getUser () async getUser ()
{ {
return await fetch('https://discord.com/api/users/@me', return await fetch('https://discord.com/api/users/@me',
{ {
headers: { headers: {
@ -1474,8 +1473,8 @@ exports.DiscordAPI = class DiscordAPI
AuthStringMaker(cookieString) AuthStringMaker(cookieString)
{ {
const splitCookie = cookieString.split('; '); const splitCookie = cookieString.split('; ');
const tokenType = splitCookie[1].split('=')[1]; const tokenType = splitCookie[0].split('=')[1];
const accessToken = splitCookie[0].split('=')[1]; const accessToken = splitCookie[1].split('=')[1];
return `${tokenType} ${accessToken}` return `${tokenType} ${accessToken}`
} }
/** /**

Loading…
Cancel
Save