Merge pull request #1346 from TheDevYellowy/main

feat: automatic timezone detection
This commit is contained in:
Elysia
2024-11-07 22:50:40 -08:00
committed by GitHub

View File

@@ -80,7 +80,7 @@ class APIRequest {
'sec-fetch-site': 'same-origin', 'sec-fetch-site': 'same-origin',
'x-debug-options': 'bugReporterEnabled', 'x-debug-options': 'bugReporterEnabled',
'x-discord-locale': 'en-US', 'x-discord-locale': 'en-US',
'x-discord-timezone': 'Asia/Saigon', 'x-discord-timezone': Intl.DateTimeFormat().resolvedOptions().timeZone,
'x-super-properties': `${Buffer.from(JSON.stringify(this.client.options.ws.properties), 'ascii').toString( 'x-super-properties': `${Buffer.from(JSON.stringify(this.client.options.ws.properties), 'ascii').toString(
'base64', 'base64',
)}`, )}`,