Update discord version, user agent

This commit is contained in:
March 7th 2022-09-26 17:53:57 +07:00
parent 8fe25ff21a
commit 7defc76498
4 changed files with 22 additions and 25 deletions

View File

@ -704,8 +704,6 @@ class WebSocketShard extends EventEmitter {
// Remove: shard: [this.id, Number(client.options.shardCount)], // Remove: shard: [this.id, Number(client.options.shardCount)],
}; };
delete d.large_threshold;
this.debug( this.debug(
`[IDENTIFY] Shard ${this.id}/${client.options.shardCount} with intents: ${Intents.resolve( `[IDENTIFY] Shard ${this.id}/${client.options.shardCount} with intents: ${Intents.resolve(
client.options.intents, client.options.intents,

View File

@ -6,28 +6,28 @@ const Package = (exports.Package = require('../../package.json'));
const { Error, RangeError, TypeError } = require('../errors'); const { Error, RangeError, TypeError } = require('../errors');
// #88: https://jnrbsn.github.io/user-agents/user-agents.json // #88: https://jnrbsn.github.io/user-agents/user-agents.json
const listUserAgent = [ const listUserAgent = [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 12.5; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12.6; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (X11; Linux i686; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (X11; Linux i686; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0', 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 12.5; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12.6; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (X11; Linux i686; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (X11; Linux i686; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0', 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Safari/605.1.15', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Edg/104.0.1293.63', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Edg/104.0.1293.63', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50',
]; ];
/** /**

View File

@ -108,8 +108,8 @@ const { randomUA } = require('../util/Constants');
/** /**
* WebSocket options (these are left as snake_case to match the API) * WebSocket options (these are left as snake_case to match the API)
* @typedef {Object} WebsocketOptions * @typedef {Object} WebsocketOptions
* @property {number} [large_threshold=50] Number of members in a guild after which offline users will no longer be * @property {boolean} [compress=false] Whether to compress data sent on the connection
* sent in the initial guild member list, must be between 50 and 250 * @property {WebSocketProperties} [properties] Properties to identify the client with
*/ */
/** /**
@ -171,24 +171,23 @@ class Options extends null {
sweepers: {}, sweepers: {},
proxy: '', proxy: '',
ws: { ws: {
large_threshold: 50,
compress: false, compress: false,
properties: { properties: {
os: 'Windows', os: 'Windows',
browser: 'Chrome', browser: 'Chrome',
device: '', device: '',
system_locale: 'en-US', system_locale: 'en-US',
browser_version: '104.0.0.0', browser_version: '105.0.0.0',
os_version: '10', os_version: '10',
referrer: '', referrer: '',
referring_domain: '', referring_domain: '',
referrer_current: '', referrer_current: '',
referring_domain_current: '', referring_domain_current: '',
release_channel: 'stable', release_channel: 'stable',
client_build_number: 142510, client_build_number: 149043,
client_event_source: null, client_event_source: null,
}, },
// ? capabilities: 509, // ? capabilities: 1021,
version: 9, version: 9,
client_state: { client_state: {
guild_hashes: {}, guild_hashes: {},
@ -196,6 +195,7 @@ class Options extends null {
read_state_version: 0, read_state_version: 0,
user_guild_settings_version: -1, user_guild_settings_version: -1,
user_settings_version: -1, user_settings_version: -1,
private_channels_version: '0',
}, },
}, },
http: { http: {

1
typings/index.d.ts vendored
View File

@ -6703,7 +6703,6 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
export type WebhookType = keyof typeof WebhookTypes; export type WebhookType = keyof typeof WebhookTypes;
export interface WebSocketOptions { export interface WebSocketOptions {
large_threshold?: number;
compress?: boolean; compress?: boolean;
properties?: WebSocketProperties; properties?: WebSocketProperties;
} }