Browse Source

typing

pull/10166/head
DA-344 2 months ago
parent
commit
f1c397dfb4
  1. 4
      discord/components.py

4
discord/components.py

@ -1267,9 +1267,9 @@ class Container(Component):
def to_dict(self) -> ContainerComponentPayload: def to_dict(self) -> ContainerComponentPayload:
payload: ContainerComponentPayload = { payload: ContainerComponentPayload = {
'type': self.type.value, # type: ignore 'type': self.type.value,
'spoiler': self.spoiler, 'spoiler': self.spoiler,
'components': [c.to_dict() for c in self.children], 'components': [c.to_dict() for c in self.children], # pyright: ignore[reportAssignmentType]
} }
if self.id is not None: if self.id is not None:
payload['id'] = self.id payload['id'] = self.id

Loading…
Cancel
Save