feat: update
- update deps - node-fetch v3 > v2 - ...
This commit is contained in:
parent
e98fa2c7f3
commit
3e5058c828
20
package.json
20
package.json
@ -52,23 +52,23 @@
|
||||
"homepage": "https://github.com/aiko-chan-ai/discord.js-selfbot-v13#readme",
|
||||
"dependencies": {
|
||||
"@aikochan2k6/qrcode-terminal": "^0.12.1",
|
||||
"@discordjs/builders": "^1.4.0",
|
||||
"@discordjs/collection": "^1.3.0",
|
||||
"@discordjs/voice": "^0.14.0",
|
||||
"@discordjs/builders": "^1.5.0",
|
||||
"@discordjs/collection": "^1.4.0",
|
||||
"@discordjs/voice": "^0.15.0",
|
||||
"@sapphire/async-queue": "^1.5.0",
|
||||
"@sapphire/shapeshift": "^3.8.1",
|
||||
"@types/node-fetch": "^2.6.2",
|
||||
"@types/ws": "^8.5.4",
|
||||
"axios": "1.1",
|
||||
"chalk": "^4.1.2",
|
||||
"discord-api-types": "^0.37.31",
|
||||
"discord-api-types": "^0.37.36",
|
||||
"form-data": "^4.0.0",
|
||||
"json-bigint": "^1.0.0",
|
||||
"node-fetch": "^3.3.0",
|
||||
"node-fetch": "^2.6.9",
|
||||
"safe-base64": "^2.0.1-0",
|
||||
"string_decoder": "^1.3.0",
|
||||
"string-similarity": "^4.0.4",
|
||||
"ws": "^8.12.0"
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.6.0",
|
||||
@ -79,18 +79,18 @@
|
||||
"@commitlint/config-angular": "^16.0.0",
|
||||
"@discordjs/docgen": "^0.11.1",
|
||||
"@favware/npm-deprecate": "^1.0.7",
|
||||
"@types/node": "^18.13.0",
|
||||
"@types/node": "^18.15.5",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"dtslint": "^4.2.1",
|
||||
"eslint": "^8.33.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^7.0.4",
|
||||
"is-ci": "^3.0.1",
|
||||
"jest": "^28.1.3",
|
||||
"lint-staged": "^12.1.4",
|
||||
"prettier": "^2.8.4",
|
||||
"prettier": "^2.8.6",
|
||||
"tsd": "^0.25.0",
|
||||
"tslint": "^6.1.3",
|
||||
"typescript": "^4.9.5"
|
||||
|
@ -15,7 +15,7 @@ function patchVoice(client) {
|
||||
'debug',
|
||||
`${chalk.greenBright('[OK]')} Patched ${chalk.cyanBright(
|
||||
'VoiceConnection.prototype.configureNetworking',
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.14.0')}]`,
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.15.0')}]`,
|
||||
);
|
||||
/* eslint-enable */
|
||||
} catch (e) {
|
||||
@ -23,19 +23,19 @@ function patchVoice(client) {
|
||||
'debug',
|
||||
`${chalk.redBright('[Fail]')} Patched ${chalk.cyanBright(
|
||||
'VoiceConnection.prototype.configureNetworking',
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.14.0')}]\n${e.stack}`,
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.15.0')}]\n${e.stack}`,
|
||||
);
|
||||
client.emit(
|
||||
Events.ERROR,
|
||||
`${chalk.redBright('[Fail]')} Patched ${chalk.cyanBright(
|
||||
'VoiceConnection.prototype.configureNetworking',
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.14.0')}]`,
|
||||
)} [${chalk.bgMagentaBright('@discordjs/voice')} - ${chalk.redBright('v0.15.0')}]`,
|
||||
);
|
||||
client.emit(
|
||||
Events.ERROR,
|
||||
`${chalk.redBright('[Error]')} Please install ${chalk.bgMagentaBright(
|
||||
'@discordjs/voice',
|
||||
)} version ${chalk.redBright('v0.14.0')}`,
|
||||
)} version ${chalk.redBright('v0.15.0')}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ const Buffer = require('node:buffer').Buffer;
|
||||
const https = require('node:https');
|
||||
const { setTimeout } = require('node:timers');
|
||||
const FormData = require('form-data');
|
||||
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
let agent = null;
|
||||
|
||||
|
@ -9,9 +9,7 @@ const getUUID = () =>
|
||||
// eslint-disable-next-line
|
||||
const checkUrl = url => {
|
||||
try {
|
||||
// eslint-disable-next-line no-new
|
||||
new URL(url);
|
||||
return true;
|
||||
return new URL(url);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
@ -194,7 +192,7 @@ class RichPresence {
|
||||
if (!(this.assets instanceof Object)) this.assets = {};
|
||||
if (typeof image != 'string') {
|
||||
image = null;
|
||||
} else if (checkUrl(image)) {
|
||||
} else if (['http:', 'https:'].includes(checkUrl(image)?.protocol)) {
|
||||
// Discord URL:
|
||||
image = image
|
||||
.replace('https://cdn.discordapp.com/', 'mp:')
|
||||
@ -231,7 +229,7 @@ https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Documents/RichP
|
||||
if (!(this.assets instanceof Object)) this.assets = {};
|
||||
if (typeof image != 'string') {
|
||||
image = null;
|
||||
} else if (checkUrl(image)) {
|
||||
} else if (['http:', 'https:'].includes(checkUrl(image)?.protocol)) {
|
||||
// Discord URL:
|
||||
image = image
|
||||
.replace('https://cdn.discordapp.com/', 'mp:')
|
||||
|
@ -4,7 +4,7 @@ const { Buffer } = require('node:buffer');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const stream = require('node:stream');
|
||||
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
||||
const fetch = require('node-fetch');
|
||||
const { Error: DiscordError, TypeError } = require('../errors');
|
||||
const Invite = require('../structures/Invite');
|
||||
|
||||
|
@ -201,7 +201,7 @@ class Options extends null {
|
||||
os_version: '10.0.22621',
|
||||
os_arch: 'x64',
|
||||
system_locale: 'en-US',
|
||||
client_build_number: 181113,
|
||||
client_build_number: 181832,
|
||||
native_build_number: 30306,
|
||||
client_event_source: null,
|
||||
design_id: 0,
|
||||
|
@ -266,8 +266,14 @@ new DiscordAuthWebsocket({
|
||||
}
|
||||
}
|
||||
_throwError(error) {
|
||||
if (error.request) {
|
||||
// Axios error
|
||||
console.dir(chalk.red(`[DiscordRemoteAuth] ERROR`), error);
|
||||
throw new Error(`Request failed with status code ${error.response.status}`);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
_send(op, data) {
|
||||
if (!this.ws) this._throwError(new Error('WebSocket is not connected.'));
|
||||
let payload = { op: op };
|
||||
|
1134
src/util/Voice.js
1134
src/util/Voice.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user