mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Show TOS on sign-ins
This commit is contained in:
parent
244b4f15ce
commit
8e2aec4d3a
@ -204,6 +204,8 @@ class Client(Methods, BaseClient):
|
||||
self.is_started = True
|
||||
|
||||
if self.user_id is None:
|
||||
print(self.TOS)
|
||||
|
||||
if self.token is None:
|
||||
self.authorize_user()
|
||||
else:
|
||||
|
@ -26,6 +26,16 @@ from ...session.internals import MsgId
|
||||
|
||||
|
||||
class BaseClient:
|
||||
TOS = (
|
||||
"By using Pyrogram you accept Telegram's Terms of Service (https://telegram.org/tos) and agree not to:\n\n"
|
||||
|
||||
"- Use the library to send spam or scam users.\n"
|
||||
"- Promote violence on publicly viewable Telegram bots, groups or channels.\n"
|
||||
"- Post illegal pornographic content on publicly viewable Telegram bots, groups or channels.\n\n"
|
||||
|
||||
"We reserve the right to update these Terms of Service later.\n"
|
||||
)
|
||||
|
||||
INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:t\.me/joinchat/)([\w-]+)$")
|
||||
BOT_TOKEN_RE = re.compile(r"^\d+:[\w-]+$")
|
||||
DIALOGS_AT_ONCE = 100
|
||||
|
Loading…
x
Reference in New Issue
Block a user