diff --git a/src/client/Client.js b/src/client/Client.js index 4242f55..92fc35c 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -627,7 +627,9 @@ class Client extends BaseClient { headers: { 'X-Context-Properties': 'eyJsb2NhdGlvbiI6Ik1hcmtkb3duIExpbmsifQ==', // Markdown Link }, - data: {}, + data: { + session_id: this.session_id, + }, }); } } diff --git a/src/structures/Invite.js b/src/structures/Invite.js index c62b4e7..bbd5978 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -337,7 +337,9 @@ class Invite extends Base { location_channel_type: ChannelTypes[this.channel?.type] ?? 0, }; await this.client.api.invites(this.code).post({ - data: {}, + data: { + session_id: this.client.session_id, + }, headers: { 'X-Context-Properties': Buffer.from(JSON.stringify(dataHeader), 'utf8').toString('base64'), }, diff --git a/src/util/Constants.js b/src/util/Constants.js index 502059d..e77f049 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -4,7 +4,7 @@ const process = require('node:process'); const Package = (exports.Package = require('../../package.json')); */ const { Error, RangeError, TypeError } = require('../errors'); -// #88: https://jnrbsn.github.io/user-agents/user-agents.json + exports.defaultUA = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9013 Chrome/108.0.5359.215 Electron/22.3.2 Safari/537.36'; diff --git a/src/util/Options.js b/src/util/Options.js index 897ed88..61632dd 100644 --- a/src/util/Options.js +++ b/src/util/Options.js @@ -201,7 +201,10 @@ class Options extends null { os_version: '10.0.22621', os_arch: 'x64', system_locale: 'en-US', - client_build_number: 198920, + browser_user_agent: + 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9013 Chrome/108.0.5359.215 Electron/22.3.2 Safari/537.36', + browser_version: '22.3.2', + client_build_number: 199933, native_build_number: 32266, client_event_source: null, design_id: 0,