Add __str__ formatting to the TelegramObject

This commit is contained in:
SamWarden 2023-06-19 22:14:20 +03:00
parent 5b20f81654
commit e9a7714c5a

View file

@ -17,6 +17,9 @@ class TelegramObject(ContextInstanceMixin["TelegramObject"], BaseModel):
allow_population_by_field_name = True
json_encoders = {datetime.datetime: lambda dt: int(dt.timestamp())}
def __str__(self) -> str:
return self.__repr__()
class MutableTelegramObject(TelegramObject):
class Config: