chore(release): v2.3.8
This commit is contained in:
parent
427ea92b88
commit
f0b45f981e
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js-selfbot-v13",
|
"name": "discord.js-selfbot-v13",
|
||||||
"version": "2.3.78",
|
"version": "2.3.8",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "discord.js-selfbot-v13",
|
"name": "discord.js-selfbot-v13",
|
||||||
"version": "2.3.78",
|
"version": "2.3.8",
|
||||||
"license": "GNU General Public License v3.0",
|
"license": "GNU General Public License v3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aikochan2k6/qrcode-terminal": "^0.12.0",
|
"@aikochan2k6/qrcode-terminal": "^0.12.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js-selfbot-v13",
|
"name": "discord.js-selfbot-v13",
|
||||||
"version": "2.3.78",
|
"version": "2.3.8",
|
||||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"types": "./typings/index.d.ts",
|
"types": "./typings/index.d.ts",
|
||||||
|
@ -814,6 +814,24 @@ class Client extends BaseClient {
|
|||||||
} else {
|
} else {
|
||||||
options.intents = Intents.resolve(options.intents);
|
options.intents = Intents.resolve(options.intents);
|
||||||
}
|
}
|
||||||
|
if (options && typeof options.checkUpdate !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'checkUpdate', 'a boolean');
|
||||||
|
}
|
||||||
|
if (options && typeof options.readyStatus !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'readyStatus', 'a boolean');
|
||||||
|
}
|
||||||
|
if (options && typeof options.autoCookie !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'autoCookie', 'a boolean');
|
||||||
|
}
|
||||||
|
if (options && typeof options.autoRedeemNitro !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'autoRedeemNitro', 'a boolean');
|
||||||
|
}
|
||||||
|
if (options && typeof options.DMSync !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'DMSync', 'a boolean');
|
||||||
|
}
|
||||||
|
if (options && typeof options.patchVoice !== 'boolean') {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'patchVoice', 'a boolean');
|
||||||
|
}
|
||||||
if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) {
|
if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) {
|
||||||
throw new TypeError('CLIENT_INVALID_OPTION', 'shardCount', 'a number greater than or equal to 1');
|
throw new TypeError('CLIENT_INVALID_OPTION', 'shardCount', 'a number greater than or equal to 1');
|
||||||
}
|
}
|
||||||
|
@ -117,14 +117,23 @@ module.exports = (client, { d: data }, shard) => {
|
|||||||
|
|
||||||
client.user._patchNote(data.notes);
|
client.user._patchNote(data.notes);
|
||||||
|
|
||||||
|
const syncTime = Date.now();
|
||||||
for (const private_channel of data.private_channels) {
|
for (const private_channel of data.private_channels) {
|
||||||
const PrivateChannel = client.channels._add(private_channel);
|
const channel = client.channels._add(private_channel);
|
||||||
client.ws.broadcast({
|
// Rate limit warning
|
||||||
op: Opcodes.DM_UPDATE,
|
if (client.options.DMSync) {
|
||||||
d: {
|
client.ws.broadcast({
|
||||||
channel_id: PrivateChannel.id,
|
op: Opcodes.DM_UPDATE,
|
||||||
},
|
d: {
|
||||||
});
|
channel_id: channel.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (client.options.DMSync) {
|
||||||
|
console.warn(
|
||||||
|
`Gateway Rate Limit Warning: Sending ${data.private_channels.length} Requests / ${Date.now() - syncTime || 1} ms`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// Remove event because memory leak
|
// Remove event because memory leak
|
||||||
|
|
||||||
|
@ -490,6 +490,7 @@ class GuildMemberManager extends CachedManager {
|
|||||||
x += 200;
|
x += 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const sendTime = Date.now();
|
||||||
for (const l of list) {
|
for (const l of list) {
|
||||||
this.guild.shard.send({
|
this.guild.shard.send({
|
||||||
op: type,
|
op: type,
|
||||||
@ -506,6 +507,7 @@ class GuildMemberManager extends CachedManager {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
console.warn(`Gateway Rate Limit Warning: Sending ${list.length} Requests / ${Date.now() - sendTime || 1} ms`);
|
||||||
}
|
}
|
||||||
const fetchedMembers = new Collection();
|
const fetchedMembers = new Collection();
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -41,6 +41,7 @@ const JSONBig = require('json-bigint');
|
|||||||
* @property {boolean} [autoCookie=true] Automatically add Cookies to Request on startup
|
* @property {boolean} [autoCookie=true] Automatically add Cookies to Request on startup
|
||||||
* @property {boolean} [patchVoice=true] Automatically patch @discordjs/voice module (support for call)
|
* @property {boolean} [patchVoice=true] Automatically patch @discordjs/voice module (support for call)
|
||||||
* @property {boolean} [autoRedeemNitro=false] Automaticlly redeems nitro codes <NOTE: there is no cooldown on the auto redeem>
|
* @property {boolean} [autoRedeemNitro=false] Automaticlly redeems nitro codes <NOTE: there is no cooldown on the auto redeem>
|
||||||
|
* @property {boolean} [DMSync=false] Automatically synchronize call status (DM and group) at startup (event synchronization) [Warning: May cause rate limit to gateway)
|
||||||
* @property {number} [shardCount=1] The total amount of shards used by all processes of this bot
|
* @property {number} [shardCount=1] The total amount of shards used by all processes of this bot
|
||||||
* (e.g. recommended shard count, shard count of the ShardingManager)
|
* (e.g. recommended shard count, shard count of the ShardingManager)
|
||||||
* @property {CacheFactory} [makeCache] Function to create a cache.
|
* @property {CacheFactory} [makeCache] Function to create a cache.
|
||||||
@ -146,6 +147,7 @@ class Options extends null {
|
|||||||
readyStatus: true,
|
readyStatus: true,
|
||||||
autoCookie: true,
|
autoCookie: true,
|
||||||
autoRedeemNitro: false,
|
autoRedeemNitro: false,
|
||||||
|
DMSync: false,
|
||||||
patchVoice: true,
|
patchVoice: true,
|
||||||
waitGuildTimeout: 15_000,
|
waitGuildTimeout: 15_000,
|
||||||
shardCount: 1,
|
shardCount: 1,
|
||||||
|
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@ -4507,6 +4507,7 @@ export interface ClientOptions {
|
|||||||
autoCookie?: boolean;
|
autoCookie?: boolean;
|
||||||
autoRedeemNitro?: boolean;
|
autoRedeemNitro?: boolean;
|
||||||
patchVoice?: boolean;
|
patchVoice?: boolean;
|
||||||
|
DMSync?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// end copy
|
// end copy
|
||||||
|
Loading…
Reference in New Issue
Block a user