You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@FrostX-Official Hes referring to my project here and for me it was an issue with my code or maybe just the way discord works but I pretty much had to add a check to see if the buttons were disabled.
def mcheck(before, after):
if before.id == message.id and not after.components[0].children[0].disabled:
self.buttons = after.components[0].children
return True
else:
return False
await self.wait_for("message_edit", check=mcheck)
await self.buttons[0].click()
After adding not after.components[0].children[0].disabled it works just fine
Summary
self.button(click) wont work on large server, but work flawlessly on small server
Reproduction Steps
run selfbot , button self click works on small server but 400 bad request on larger sever.
Code
Expected Results
the button clicked
Actual Results
[2023-12-18 02:49:02] [ERROR ] discord.client: Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\Dhinotea\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\client.py", line 600, in _run_event
await coro(*args, **kwargs)
File "C:\abc\main.py", line 223, in on_message
await self.buttons[1].click()
File "C:\Users\Dhinotea\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\components.py", line 243, in click
return await _wrapped_interaction(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dhinotea\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\interactions.py", line 203, in _wrapped_interaction
await state.http.interact(type, data, channel, nonce=nonce, **kwargs)
File "C:\Users\Dhinotea\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\http.py", line 930, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data: Component validation failed
System Information
Checklist
Additional Information
sometimes it works on large server, like 1 out of 1000 times. but on small server it works every single time.
The text was updated successfully, but these errors were encountered: