Closed dylan0356 closed 1 year ago
Seems with this change I am still getting a proxy issue:
HTTPError [TypeError]: proxy is not a constructor at RequestHandler.execute (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:212:15) at RequestHandler.execute (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:216:19) at RequestHandler.push (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:62:25) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Client.fetchInvite (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/Client.js:584:18) at async Client.<anonymous> (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/index.js:40:13) { code: 500, method: 'get', path: '/invites/m49bvR4Q?with_counts=true&with_expiration=true', requestData: { json: undefined, files: [], headers: undefined } }
All I am trying to do is fetch and join an invite: ` for (let i = 0; i < serverInvites.length; i++) { const inviteCode = serverInvites[i];
await client.fetchInvite(inviteCode).then(async (invite) => {
await invite.acceptInvite(true).then(() => {
console.log(chalk.green("Joined ") + gradient.cristal(invite.guild.name))
}
).catch((err) => {
console.log(err)
console.log(chalk.red("Failed to join ") + gradient.cristal(invite.guild.name))
}
)
}).catch((err) => {
console.log(chalk.red("Failed to join ") + gradient.cristal(inviteCode))
console.log(err)
}
)
}`
fixed (2.14.11)
Which package has the bugs?
The core library
Issue description
Tried to use a agent to set the clients proxy
/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:284 args.agent = new proxy(client.options.proxy); ^
TypeError: proxy is not a constructor at /Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:284:22 at new Promise ()
at WebSocketShard.connect (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:208:12)
at WebSocketManager.createShards (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:262:19)
at WebSocketManager.connect (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:182:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.login (/Users/dylanb/Documents/Github/DiscordBots/QuackSelfBot/node_modules/discord.js-selfbot-v13/src/client/Client.js:354:7)
Node.js v18.16.0
Code sample
Package version
2.14.5
Node.js version
v18.16.0
Operating system
Mac OS
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
No response