aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
742 stars 161 forks source link

Proxy not being used #656

Closed TahaGorme closed 1 year ago

TahaGorme commented 1 year ago

Which package has the bugs?

The core library

Issue description

the proxy is not being used for joining servers. i used rotating resedential proxies for fetching invites and then joining servers. i did this with like 50 to 100 tokens. at the end, hardly any of the tokens joined server and when i just pasted an invite in discord, i found out that my ip has been rate limited from accessing the invites endpoint. this means that the proxy was not being used.

Code sample

this is what i put in client options

 var agent = HttpsProxyAgent("http://user:password@ip:port");

Client({
        captchaService:"2captcha",
        captchaKey: "apikey",
        checkUpdate: false,
        http: { agent: agent },
        restRequestTimeout: 60 * 1000,
        interactionTimeout: 60 * 1000,
        restWsBridgeTimeout: 5 * 1000
      })

i even tried adding the proxy as string(in the format https://user:pass@ip:port) in client options, but as soon as i ran the program, it was not able to login into the tokens (showed the tokens as invalid)

Client({
proxy:"https://user:pass@ip:port"
})

Package version

2.14.0

Node.js version

18.16.0

Operating system

windows

Priority this issue should have

High (immediate attention needed)

Checklist

Additional Information

No response

aiko-chan-ai commented 1 year ago

This feature is not officially supported yet, I will roll it out later

TahaGorme commented 1 year ago

This feature is not officially supported yet, I will roll it out later

any estimated time?

aiko-chan-ai commented 1 year ago

no ETA πŸ’€

TahaGorme commented 1 year ago

no ETA πŸ’€

can you just suggest or guide me how to do it myself? or just name the file names to modify and i will try to do it πŸ’€ . its really important

TahaGorme commented 1 year ago

@aiko-chan-ai just tell the file name to modify

aiko-chan-ai commented 1 year ago

i used the hack method mentioned in discord.js, and if it still doesn't work i cant help you https://github.com/discordjs/discord.js/issues/3039

TahaGorme commented 1 year ago

@aiko-chan-ai thank you so much, it works. now i just need a very small help. more than half of the accounts do not join the server, they give the error DiscordAPIError: Unknown Message

aiko-chan-ai commented 1 year ago

hmm which method did you use?

TahaGorme commented 1 year ago

@aiko-chan-ai the normal join thingy

fetch invite and then accept invite

aiko-chan-ai commented 1 year ago

I mean proxy :c

TahaGorme commented 1 year ago

i mean i used both of the methods mentioned

aiko-chan-ai commented 1 year ago

socks-proxy-agent or proxy-agent ?

TahaGorme commented 1 year ago

a different package - https-proxy-agent

TahaGorme commented 1 year ago

the package does not matter, the proxy agent matters right?

also do you know the fix for the error DiscordAPIError: Unknown Message ??

TahaGorme commented 1 year ago

image this is really annoying :(

TahaGorme commented 1 year ago

@aiko-chan-ai PLZPLZPLZPZL

aiko-chan-ai commented 1 year ago

maybe i will fix agent to work with proxy

TahaGorme commented 1 year ago

Do you know whats causing that error?

aiko-chan-ai commented 1 year ago

I tried many ways, it only worked for a short time

TahaGorme commented 1 year ago

ill create a new issue for the error

aiko-chan-ai commented 1 year ago

https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/561 https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/551 https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/523

TahaGorme commented 1 year ago

can i add you on discord? if so, add me T4H4#6709

TahaGorme commented 1 year ago

i discovered something weird about discord.

TahaGorme commented 1 year ago

@aiko-chan-ai if i get that error, can i retry joining the server from the token?

aiko-chan-ai commented 1 year ago

yep

simple-YoungBadBoy commented 1 year ago

same question

TahaGorme commented 1 year ago

@simple-YoungBadBoy did you manage to fix the proxy issue? i managed to fix it

aiko-chan-ai commented 1 year ago

try using the latest version

aphwong commented 1 year ago

same proxy not being used issue here. Besides, 2capcha solved but the program said captcha required

image
dylan0356 commented 11 months ago

I am still getting this issue

/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 (<anonymous>)
    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:342:7)

Node.js v18.16.0