mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Add str and repr to ToS
This commit is contained in:
@@ -156,5 +156,11 @@ class TermsOfService:
|
|||||||
|
|
||||||
await self._client(_tl.fn.account.DeleteAccount('Decline ToS update'))
|
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):
|
def __bool__(self):
|
||||||
return self._tos is not None
|
return self._tos is not None
|
||||||
|
Reference in New Issue
Block a user