mini update
- ClientUserSettingManager (Discum) - Document (API version, Cookie, ...) - x-super-properties header Request (Discum)
This commit is contained in:
@@ -103,6 +103,51 @@ const listUserAgent = [
|
||||
"Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1"
|
||||
]
|
||||
|
||||
exports.DMScanLevel = {
|
||||
0: 'NOT_SCAN',
|
||||
1: 'NOT_FRIEND',
|
||||
2: 'EVERYONE',
|
||||
};
|
||||
|
||||
exports.stickerAnimationMode = {
|
||||
0: 'ALWAYS',
|
||||
1: 'INTERACTION',
|
||||
2: 'NEVER',
|
||||
};
|
||||
|
||||
exports.localeObject = {
|
||||
da: 'DANISH',
|
||||
de: 'GERMAN',
|
||||
'en-GB': 'ENGLISH_UK',
|
||||
'en-US': 'ENGLISH_US',
|
||||
'es-ES': 'SPANISH',
|
||||
fr: 'FRENCH',
|
||||
hr: 'CROATIAN',
|
||||
it: 'ITALIAN',
|
||||
lt: 'LITHUANIAN',
|
||||
hu: 'HUNGARIAN',
|
||||
nl: 'DUTCH',
|
||||
no: 'NORWEGIAN',
|
||||
pl: 'POLISH',
|
||||
'pt-BR': 'BRAZILIAN_PORTUGUESE',
|
||||
ro: 'ROMANIA_ROMANIAN',
|
||||
fi: 'FINNISH',
|
||||
'sv-SE': 'SWEDISH',
|
||||
vi: 'VIETNAMESE',
|
||||
tr: 'TURKISH',
|
||||
cs: 'CZECH',
|
||||
el: 'GREEK',
|
||||
bg: 'BULGARIAN',
|
||||
ru: 'RUSSIAN',
|
||||
uk: 'UKRAINIAN',
|
||||
hi: 'HINDI',
|
||||
th: 'THAI',
|
||||
'zh-CN': 'CHINA_CHINESE',
|
||||
ja: 'JAPANESE',
|
||||
'zh-TW': 'TAIWAN_CHINESE',
|
||||
ko: 'KOREAN',
|
||||
};
|
||||
|
||||
exports.UserAgent = listUserAgent[Math.floor(Math.random() * listUserAgent.length)];
|
||||
|
||||
exports.WSCodes = {
|
||||
|
@@ -132,76 +132,91 @@ class Options extends null {
|
||||
*/
|
||||
static createDefault() {
|
||||
return {
|
||||
jsonTransformer: (object) => JSONBig.stringify(object),
|
||||
checkUpdate: true,
|
||||
readyStatus: false,
|
||||
waitGuildTimeout: 15_000,
|
||||
shardCount: 1,
|
||||
makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings),
|
||||
messageCacheLifetime: 0,
|
||||
messageSweepInterval: 0,
|
||||
invalidRequestWarningInterval: 0,
|
||||
intents: 65535,
|
||||
partials: [
|
||||
'USER',
|
||||
'CHANNEL',
|
||||
'GUILD_MEMBER',
|
||||
'MESSAGE',
|
||||
'REACTION',
|
||||
'GUILD_SCHEDULED_EVENT',
|
||||
], // Enable the partials
|
||||
restWsBridgeTimeout: 5_000,
|
||||
restRequestTimeout: 15_000,
|
||||
restGlobalRateLimit: 0,
|
||||
retryLimit: 1,
|
||||
restTimeOffset: 500,
|
||||
restSweepInterval: 60,
|
||||
failIfNotExists: false,
|
||||
userAgentSuffix: [],
|
||||
presence: {},
|
||||
sweepers: {},
|
||||
ws: {
|
||||
large_threshold: 50,
|
||||
compress: false,
|
||||
properties: {
|
||||
//$os: 'iPhone14,5',
|
||||
//$browser: 'Discord iOS',
|
||||
//$device: 'iPhone14,5 OS 15.2',
|
||||
$os: 'Windows 11',
|
||||
$browser: 'Chrome',
|
||||
$device: 'ASUS ROG Phone 5',
|
||||
},
|
||||
version: 9,
|
||||
},
|
||||
http: {
|
||||
headers: {
|
||||
Accept: '*/*',
|
||||
// 'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Accept-Language': 'en-US,en;q=0.9',
|
||||
'Cache-Control': 'no-cache',
|
||||
// 'Content-Type': 'application/json',
|
||||
Pragma: 'no-cache',
|
||||
Referer: 'https://discord.com/channels/@me',
|
||||
'Sec-Ch-Ua': '" Not A;Brand";v="99" "',
|
||||
'Sec-Ch-Ua-Mobile': '?0',
|
||||
'Sec-Ch-Ua-Platform': '"iOS"',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'X-Debug-Options': 'bugReporterEnabled',
|
||||
'X-Discord-Locale': 'en-US',
|
||||
Origin: 'https://discord.com',
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36',
|
||||
},
|
||||
agent: {},
|
||||
version: 9,
|
||||
api: 'https://discord.com/api',
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
invite: 'https://discord.gg',
|
||||
template: 'https://discord.new',
|
||||
scheduledEvent: 'https://discord.com/events',
|
||||
},
|
||||
};
|
||||
jsonTransformer: (object) => JSONBig.stringify(object),
|
||||
checkUpdate: true,
|
||||
readyStatus: false,
|
||||
waitGuildTimeout: 15_000,
|
||||
shardCount: 1,
|
||||
makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings),
|
||||
messageCacheLifetime: 0,
|
||||
messageSweepInterval: 0,
|
||||
invalidRequestWarningInterval: 0,
|
||||
intents: 65535,
|
||||
partials: [
|
||||
'USER',
|
||||
'CHANNEL',
|
||||
'GUILD_MEMBER',
|
||||
'MESSAGE',
|
||||
'REACTION',
|
||||
'GUILD_SCHEDULED_EVENT',
|
||||
], // Enable the partials
|
||||
restWsBridgeTimeout: 5_000,
|
||||
restRequestTimeout: 15_000,
|
||||
restGlobalRateLimit: 0,
|
||||
retryLimit: 1,
|
||||
restTimeOffset: 500,
|
||||
restSweepInterval: 60,
|
||||
failIfNotExists: false,
|
||||
userAgentSuffix: [],
|
||||
presence: {},
|
||||
sweepers: {},
|
||||
ws: {
|
||||
large_threshold: 50,
|
||||
compress: false,
|
||||
properties: {
|
||||
//$os: 'iPhone14,5',
|
||||
//$browser: 'Discord iOS',
|
||||
//$device: 'iPhone14,5 OS 15.2',
|
||||
$os: 'Windows',
|
||||
$browser: 'Discord Client',
|
||||
$device: 'ASUS ROG Phone 5',
|
||||
},
|
||||
version: 9,
|
||||
},
|
||||
http: {
|
||||
headers: {
|
||||
Accept: '*/*',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Accept-Language': 'en-US,en;q=0.9',
|
||||
'Cache-Control': 'no-cache',
|
||||
Pragma: 'no-cache',
|
||||
Referer: 'https://discord.com/channels/@me',
|
||||
'Sec-Ch-Ua': '" Not A;Brand";v="99" "',
|
||||
'Sec-Ch-Ua-Mobile': '?0',
|
||||
'Sec-Ch-Ua-Platform': '"iOS"',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'X-Debug-Options': 'bugReporterEnabled',
|
||||
// https://github.com/Merubokkusu/Discord-S.C.U.M/issues/66#issuecomment-1009171667
|
||||
'x-super-properties': `${Buffer.from(
|
||||
JSONBig.stringify({
|
||||
os: 'Windows',
|
||||
browser: 'Discord Client',
|
||||
release_channel: 'stable',
|
||||
client_version: '1.0.9004',
|
||||
os_version: '10.0.22000',
|
||||
os_arch: 'x64',
|
||||
system_locale: 'en-US',
|
||||
client_build_number: 122087,
|
||||
client_event_source: null,
|
||||
}),
|
||||
'ascii',
|
||||
).toString('base64')}`,
|
||||
'X-Discord-Locale': 'en-US',
|
||||
Origin: 'https://discord.com',
|
||||
'user-agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9004 Chrome/91.0.4472.164 Electron/13.6.6 Safari/537.36',
|
||||
},
|
||||
agent: {},
|
||||
version: 9,
|
||||
api: 'https://discord.com/api',
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
invite: 'https://discord.gg',
|
||||
template: 'https://discord.new',
|
||||
scheduledEvent: 'https://discord.com/events',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user