mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Display notice only once
This commit is contained in:
parent
cbcb1c78c4
commit
519e9c8613
1 changed files with 6 additions and 2 deletions
|
|
@ -66,9 +66,13 @@ class Session:
|
||||||
ACKS_THRESHOLD = 8
|
ACKS_THRESHOLD = 8
|
||||||
PING_INTERVAL = 5
|
PING_INTERVAL = 5
|
||||||
|
|
||||||
|
notice_displayed = False
|
||||||
|
|
||||||
def __init__(self, dc_id: int, test_mode: bool, auth_key: bytes, api_id: str):
|
def __init__(self, dc_id: int, test_mode: bool, auth_key: bytes, api_id: str):
|
||||||
print("Pyrogram v{}, {}".format(__version__, __copyright__))
|
if not Session.notice_displayed:
|
||||||
print("Licensed under the terms of the " + __license__)
|
print("Pyrogram v{}, {}".format(__version__, __copyright__))
|
||||||
|
print("Licensed under the terms of the " + __license__, end="\n\n")
|
||||||
|
Session.notice_displayed = True
|
||||||
|
|
||||||
self.connection = Connection(DataCenter(dc_id, test_mode))
|
self.connection = Connection(DataCenter(dc_id, test_mode))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue