mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-27 21:45:27 +00:00
Fix Modal not raising when hitting the 5 item limit
This commit is contained in:
parent
753db1724b
commit
9677dada1f
@ -235,3 +235,8 @@ class Modal(BaseView):
|
||||
}
|
||||
|
||||
return payload
|
||||
|
||||
def add_item(self, item: Item[Any]) -> Self:
|
||||
if len(self._children) >= 5:
|
||||
raise ValueError('maximum number of children exceeded (5)')
|
||||
return super().add_item(item)
|
||||
|
Loading…
x
Reference in New Issue
Block a user