Fix certain component IDs not being able to be settable afterwards

Fix #10305
This commit is contained in:
Rapptz
2025-09-28 13:05:23 -04:00
parent c050ed02c3
commit 78ff16621a
3 changed files with 27 additions and 2 deletions

View File

@@ -100,7 +100,15 @@ class File(Item[V]):
spoiler=bool(spoiler),
id=id,
)
self.id = id
@property
def id(self) -> Optional[int]:
"""Optional[:class:`int`]: The ID of this file component."""
return self._underlying.id
@id.setter
def id(self, value: Optional[int]) -> None:
self._underlying.id = value
def _is_v2(self):
return True