chore: update client version & fetch headers

This commit is contained in:
Elysia 2023-05-18 15:52:16 +07:00
parent 8a19880820
commit 767b740c05
2 changed files with 18 additions and 18 deletions

View File

@ -48,26 +48,26 @@ class APIRequest {
let headers = { let headers = {
...this.client.options.http.headers, ...this.client.options.http.headers,
Accept: '*/*', accept: '*/*',
origin: 'https://discord.com', 'accept-language': 'en-US',
'Accept-Language': 'en-US',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'X-Debug-Options': 'bugReporterEnabled',
'X-Super-Properties': `${Buffer.from(
this.client.options.jsonTransformer(this.client.options.ws.properties),
'ascii',
).toString('base64')}`,
'X-Discord-Locale': 'en-US',
'User-Agent': this.client.options.http.headers['User-Agent'],
Referer: 'https://discord.com/channels/@me',
Connection: 'keep-alive',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': 'Windows',
'sec-ch-ua': `"Not?A_Brand";v="8", "Chromium";v="${ 'sec-ch-ua': `"Not?A_Brand";v="8", "Chromium";v="${
/Chrome\/(\d+)/.exec(this.client.options.http.headers['User-Agent'])[1] /Chrome\/(\d+)/.exec(this.client.options.http.headers['User-Agent'])[1]
}"`, }"`,
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'x-debug-options': 'bugReporterEnabled',
'x-discord-locale': 'en-US',
'x-discord-timezone': 'Asia/Saigon',
'x-super-properties': `${Buffer.from(
this.client.options.jsonTransformer(this.client.options.ws.properties),
'ascii',
).toString('base64')}`,
Referer: 'https://discord.com/channels/@me',
origin: 'https://discord.com',
'Referrer-Policy': 'strict-origin-when-cross-origin',
}; };
if (this.options.auth !== false) headers.Authorization = this.rest.getAuth(); if (this.options.auth !== false) headers.Authorization = this.rest.getAuth();

View File

@ -201,7 +201,7 @@ class Options extends null {
os_version: '10.0.22621', os_version: '10.0.22621',
os_arch: 'x64', os_arch: 'x64',
system_locale: 'en-US', system_locale: 'en-US',
client_build_number: 197575, client_build_number: 198920,
native_build_number: 32266, native_build_number: 32266,
client_event_source: null, client_event_source: null,
design_id: 0, design_id: 0,