@@ -3392,7 +3392,7 @@ <h3>Inherited members</h3>
33923392
33933393 @property
33943394 def attributes(self) -> Set[str]: # type: ignore[override]
3395- return super().attributes.union({"timestamp", "format", "url", "fallback"})
3395+ return super().attributes.union({"timestamp", "format", "url", "fallback", "style" })
33963396
33973397 def __init__(
33983398 self,
@@ -3401,6 +3401,7 @@ <h3>Inherited members</h3>
34013401 format: str,
34023402 url: Optional[str] = None,
34033403 fallback: Optional[str] = None,
3404+ style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
34043405 **others: dict,
34053406 ):
34063407 super().__init__(type=self.type)
@@ -3409,40 +3410,45 @@ <h3>Inherited members</h3>
34093410 self.format = format
34103411 self.url = url
34113412 self.fallback = fallback
3413+ self.style = style
34123414
34133415 class Broadcast(RichTextElement):
34143416 type = "broadcast"
34153417
34163418 @property
34173419 def attributes(self) -> Set[str]: # type: ignore[override]
3418- return super().attributes.union({"range"})
3420+ return super().attributes.union({"range", "style" })
34193421
34203422 def __init__(
34213423 self,
34223424 *,
34233425 range: str, # channel, here, ..
3426+ style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
34243427 **others: dict,
34253428 ):
34263429 super().__init__(type=self.type)
34273430 show_unknown_key_warning(self, others)
34283431 self.range = range
3432+ self.style = style
34293433
34303434 class Color(RichTextElement):
34313435 type = "color"
34323436
34333437 @property
34343438 def attributes(self) -> Set[str]: # type: ignore[override]
3435- return super().attributes.union({"value"})
3439+ return super().attributes.union({"value", "style" })
34363440
34373441 def __init__(
34383442 self,
34393443 *,
34403444 value: str,
3445+ style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
34413446 **others: dict,
34423447 ):
34433448 super().__init__(type=self.type)
34443449 show_unknown_key_warning(self, others)
3445- self.value = value</ code > </ pre >
3450+ self.value = value
3451+ self.style = style</ code > </ pre >
34463452</ details >
34473453< div class ="desc "> </ div >
34483454< h3 > Class variables</ h3 >
0 commit comments