dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
648 stars 153 forks source link

Error join guild #684

Open kwaki01 opened 2 months ago

kwaki01 commented 2 months ago

Summary

Not work join guild or accept invite

Reproduction Steps

In the latest build, the connection to my server does not work. await client.join_guild(1095380562245590236, lurking = True) doesn't work. By invitation await client.accept_invite('https://discord.gg/nUeZdpUzme') also does not work. When connecting by invitation, it asks you to solve a captcha in which the captcha_rqdata parameter is not passed.

Code

import discord
import asyncio

token = 'MTA2NjA5ODY5ODc3MTIzOTAzNQ.GZ79t9.MzkbTfCeftF_b9PFpinHgUo-xeFFfZAVt1srCI'
proxy = 'http://195.208.127.244:63408'
proxy_user = 'D8Y9p8n8'
proxy_password = '6d8kU8i8'

async def CaptchaSolver(data, client):
    data = data.json
    ...
    return solver

policy = asyncio.WindowsSelectorEventLoopPolicy()
asyncio.set_event_loop_policy(policy)
client = discord.Client(captcha_handler = CaptchaSolver, proxy = proxy, proxy_auth = aiohttp.BasicAuth(proxy_user, proxy_password))

@client.event
async def on_connect():
    await client.accept_invite('https://discord.gg/nUeZdpUzme')
    # or
    # await client.join_guild(1095380562245595036, lurking = True)

try:
    client.run(token, reconnect = False)
# Ctrl + Break
except KeyboardInterrupt:
    print('STOP!!!!')
    client.close()
except Exception as e:
    print('Error  : ' + type(e).__name__ + ' : ' + str(e))

Expected Results

{'captcha_key': ['You need to update your app to join this server.'], 'captcha_sitekey': 'f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34', 'captcha_service': 'hcaptcha'} - outputting the input parameter to the function for solving captcha (data in CaptchaSolver)

Actual Results

not work

System Information

Checklist

Additional Information

No response