Browse Source

add note about Item.custom_id

pull/10166/head
DA-344 1 month ago
parent
commit
9026bcbb1d
  1. 2
      discord/ui/item.py

2
discord/ui/item.py

@ -83,6 +83,8 @@ class Item(Generic[V]):
self._max_row: int = 5 if not self._is_v2() else 10
if self._is_v2():
# this is done so v2 components can be stored on ViewStore._views
# and does not break v1 components custom_id property
self.custom_id: str = os.urandom(16).hex()
def to_component_dict(self) -> Dict[str, Any]:

Loading…
Cancel
Save