Sopur / Discord-user-bots

Working discord user bots library.
MIT License
86 stars 37 forks source link

Is there any replacement for join_guild function. #15

Closed nabeel77 closed 4 months ago

nabeel77 commented 2 years ago

Hi,

The join_guild function is deprecated. Is there any replacement for it? I also send you a request on discord if you would accept. I am Thrall#7810. Really need to discuss this and need help with this.

Sopur commented 2 years ago

For anyone with the same question, there will be an update soon with a working join_guild function once Node 18.0 is released.

Imraj commented 2 years ago

@Sopur any update on join_guild function given Node 18.0 was released about 2 weeks ago. https://nodejs.org/en/blog/announcements/v18-release-announce/

Sopur commented 2 years ago

@Imraj I've tried looking into the task, but it is very difficult. Discord does a lot of hijacking throughout the native functions making it hard to see what Discord is really doing. It also runs before TamperMonkey's and GreasyMonkey's "// run-at document-start" functionality, making it annoying to deal with. I thought I could easily bypass discord's anti script with the native fetch but I guess I was too naive. However, I can say what I have found out: Joining guilds has nothing to do with any other API calls or even science calls, most likely uses captcha, forces your account to require phone verification if you include the correct headers but wrong information, and the way you fetch (That be browser fetching or Node-Fetch) makes no difference, as not even cURL works. Throughout many hours trying to get the join_guild function to work, I've been unsuccessful. If anyone finds out anything that could help, please message me on Discord at Sopur#3550.

rvdce commented 1 year ago

Yeah, all we need some solution on join_guild function.

Sopur commented 4 months ago

The join_guild method now works! The problem seemed to be header order/contents, so I made a custom HTTP client to mimic behavior of common browser clients, which seemed to do the trick. This allowed me to add support for other user-only methods too, such as a send_friend_request method.