I have a view that has a buttons I update pretty frequently to which I have to sometimes add or update buttons so i just clear_items then add them again then update the message but sometimes very randomly it just doesn't clear idky
print(self.to_components)
self.clear_items()
print(self.to_components)
self.poke_button()
self.skill_button()
self.ult_button()
self.skip_button()
print(self.to_components)
<bound method View.to_components of <MovesSelection timeout=1500 children=4>>
<bound method View.to_components of <MovesSelection timeout=1500 children=4>>
<bound method View.to_components of <MovesSelection timeout=1500 children=8>>
An error occurred:
Traceback (most recent call last):
File "c:\Users\Hi\Documents\codes\Project Valor\Valor\bot_files\cogs\TitanDescent.py", line 6645, in update_buttons
await self.message.edit(view=self)
File "c:\Users\Hi\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\message.py", line 1630, in edit
data = await self._state.http.edit_message(
File "c:\Users\Hi\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 374, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In components.0.components: Must be between 1 and 5 in length.