fix: missing deps

This commit is contained in:
March 7th 2022-10-15 12:26:52 +07:00
parent 8b7a93bf22
commit 17b3ca237c
6 changed files with 670 additions and 691 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "2.8.1", "version": "2.8.3",
"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",
@ -54,6 +54,7 @@
"@aikochan2k6/qrcode-terminal": "^0.12.1", "@aikochan2k6/qrcode-terminal": "^0.12.1",
"@discordjs/builders": "^1.3.0", "@discordjs/builders": "^1.3.0",
"@discordjs/collection": "^1.2.0", "@discordjs/collection": "^1.2.0",
"@discordjs/voice": "^0.13.0",
"@sapphire/async-queue": "^1.5.0", "@sapphire/async-queue": "^1.5.0",
"@sapphire/shapeshift": "^3.7.0", "@sapphire/shapeshift": "^3.7.0",
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",

View File

@ -3,7 +3,6 @@
const process = require('node:process'); const process = require('node:process');
const { setInterval, setTimeout } = require('node:timers'); const { setInterval, setTimeout } = require('node:timers');
const { Collection } = require('@discordjs/collection'); const { Collection } = require('@discordjs/collection');
const { getVoiceConnection } = require('@discordjs/voice');
const BaseClient = require('./BaseClient'); const BaseClient = require('./BaseClient');
const ActionsManager = require('./actions/ActionsManager'); const ActionsManager = require('./actions/ActionsManager');
const ClientVoiceManager = require('./voice/ClientVoiceManager'); const ClientVoiceManager = require('./voice/ClientVoiceManager');
@ -301,6 +300,7 @@ class Client extends BaseClient {
* @readonly * @readonly
*/ */
get callVoice() { get callVoice() {
const { getVoiceConnection } = require('@discordjs/voice');
return getVoiceConnection(null); return getVoiceConnection(null);
} }

View File

@ -1,10 +1,12 @@
'use strict'; 'use strict';
let ClientUser; let ClientUser;
const { VoiceConnection } = require('@discordjs/voice');
const axios = require('axios'); const axios = require('axios');
const chalk = require('chalk'); const chalk = require('chalk');
const Discord = require('../../../index'); const Discord = require('../../../index');
const { Events, Opcodes } = require('../../../util/Constants'); const { Events, Opcodes } = require('../../../util/Constants');
const { VoiceConnection: VoiceConnection_patch } = require('../../../util/Voice');
let running = false; let running = false;
/** /**
* Emitted whenever clientOptions.checkUpdate = false * Emitted whenever clientOptions.checkUpdate = false
@ -64,8 +66,6 @@ module.exports = async (client, { d: data }, shard) => {
if (client.options.patchVoice && !running) { if (client.options.patchVoice && !running) {
try { try {
const { VoiceConnection } = require('@discordjs/voice');
const { VoiceConnection: VoiceConnection_patch } = require('../../../util/Voice');
/* eslint-disable */ /* eslint-disable */
VoiceConnection.prototype.configureNetworking = VoiceConnection_patch.prototype.configureNetworking; VoiceConnection.prototype.configureNetworking = VoiceConnection_patch.prototype.configureNetworking;
client.emit( client.emit(

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
const { Collection } = require('@discordjs/collection'); const { Collection } = require('@discordjs/collection');
const { joinVoiceChannel, entersState, VoiceConnectionStatus } = require('@discordjs/voice');
const { Channel } = require('./Channel'); const { Channel } = require('./Channel');
const TextBasedChannel = require('./interfaces/TextBasedChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel');
const InteractionManager = require('../managers/InteractionManager'); const InteractionManager = require('../managers/InteractionManager');
@ -115,6 +115,7 @@ class DMChannel extends Channel {
* @returns {Promise<VoiceConnection>} * @returns {Promise<VoiceConnection>}
*/ */
call(options = {}) { call(options = {}) {
const { joinVoiceChannel, entersState, VoiceConnectionStatus } = require('@discordjs/voice');
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!this.client.options.patchVoice) { if (!this.client.options.patchVoice) {
reject( reject(

File diff suppressed because it is too large Load Diff