mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-02 00:04:15 +03:00
Add str and repr to ToS
This commit is contained in:
parent
ab150bf457
commit
dd2f83b7ac
|
@ -156,5 +156,11 @@ class TermsOfService:
|
|||
|
||||
await self._client(_tl.fn.account.DeleteAccount('Decline ToS update'))
|
||||
|
||||
def __str__(self):
|
||||
return self.markdown or '(empty ToS)'
|
||||
|
||||
def __repr__(self):
|
||||
return f'TermsOfService({self.markdown!r})'
|
||||
|
||||
def __bool__(self):
|
||||
return self._tos is not None
|
||||
|
|
Loading…
Reference in New Issue
Block a user