|
|
@ -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}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|