mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Merge branch 'tos' into layer-81
# Conflicts: # pyrogram/client/ext/base_client.py
This commit is contained in:
commit
668da4ae0e
2 changed files with 12 additions and 0 deletions
|
|
@ -199,6 +199,8 @@ class Client(Methods, BaseClient):
|
||||||
self.is_started = True
|
self.is_started = True
|
||||||
|
|
||||||
if self.user_id is None:
|
if self.user_id is None:
|
||||||
|
print(self.TOS)
|
||||||
|
|
||||||
if self.token is None:
|
if self.token is None:
|
||||||
self.authorize_user()
|
self.authorize_user()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,16 @@ from ...session.internals import MsgId
|
||||||
|
|
||||||
|
|
||||||
class BaseClient:
|
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?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/)([\w-]+)$")
|
INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/)([\w-]+)$")
|
||||||
BOT_TOKEN_RE = re.compile(r"^\d+:[\w-]+$")
|
BOT_TOKEN_RE = re.compile(r"^\d+:[\w-]+$")
|
||||||
DIALOGS_AT_ONCE = 100
|
DIALOGS_AT_ONCE = 100
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue