From 9026bcbb1d45ba41df09ce9fddff231268fd4987 Mon Sep 17 00:00:00 2001 From: DA-344 <108473820+DA-344@users.noreply.github.com> Date: Sat, 19 Apr 2025 09:57:02 +0200 Subject: [PATCH] add note about Item.custom_id --- discord/ui/item.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/ui/item.py b/discord/ui/item.py index 614859d72..d735641db 100644 --- a/discord/ui/item.py +++ b/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]: