File tree Expand file tree Collapse file tree
pyrogram/types/messages_and_media Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121import pyrogram
2222from pyrogram import enums , raw , types , utils
23-
24- from ..object import Object
2523from pyrogram .types .messages_and_media .message import Str
2624
25+ from ..object import Object
2726
2827
2928class FormattedText (Object ):
@@ -43,7 +42,7 @@ class FormattedText(Object):
4342 def __init__ (
4443 self ,
4544 * ,
46- text : str ,
45+ text : Str ,
4746 parse_mode : Optional ["enums.ParseMode" ] = None ,
4847 entities : Optional [List ["types.MessageEntity" ]] = None ,
4948 ):
@@ -53,6 +52,9 @@ def __init__(
5352 self .parse_mode = parse_mode
5453 self .entities = entities
5554
55+ def __str__ (self ) -> str :
56+ return self .text
57+
5658 @staticmethod
5759 def _parse (client : "pyrogram.Client" , text : "raw.types.TextWithEntities" ) -> "FormattedText" :
5860 if not isinstance (text , raw .types .TextWithEntities ):
You can’t perform that action at this time.
0 commit comments