Closed JamesTesting888 closed 1 year ago
Here is the HCaptchaHandler code in case it has something to do with it.
class HCaptchaHandler(discord.CaptchaHandler):
async def fetch_token(self, data: dict, proxy: str, proxy_auth: aiohttp.BasicAuth) -> str:
solver = twocaptcha.TwoCaptcha('key')
sitekey = data['captcha_sitekey']
url = "https://discord.com/channels/@me"
try:
response = await asyncio.to_thread(
solver.hcaptcha,
sitekey=sitekey,
url=url,
data=data['captcha_rqdata']
)
except:
raise
print("Captcha solved")
return response['code']
Are you saying the message you just sent shows up in on_message? That's intended, no filtering is done. Any message Discord dispatches will be parsed and dispatched to on_message, this includes your own messages.
No, I do filter my own message. I think it might be an internet issue as this issue is not happening consistently. Thanks for the response!
Summary
on_message
event triggered multiple timeReproduction Steps
Bot definition:
on_message event
Captcha is triggered and then solved. The message was sent successfully.
Code
No response
Expected Results
The message gets sent, when the on_message event is triggered.
Actual Results
The message does get sent, but the on_message event get triggered again for the same message object.
System Information
Latest discord.py-self master branch. Python 3.9
Checklist
Additional Information
No response