mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-13 04:56:35 +03:00
Move qrlogin with the rest of custom types
This commit is contained in:
parent
bc03419902
commit
3f74f83964
|
@ -31,6 +31,7 @@ Auth
|
||||||
start
|
start
|
||||||
send_code_request
|
send_code_request
|
||||||
sign_in
|
sign_in
|
||||||
|
qr_login
|
||||||
sign_up
|
sign_up
|
||||||
log_out
|
log_out
|
||||||
edit_2fa
|
edit_2fa
|
||||||
|
|
|
@ -5,8 +5,7 @@ import sys
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
from .. import utils, helpers, errors, password as pwd_mod
|
from .. import utils, helpers, errors, password as pwd_mod
|
||||||
from ..qrlogin import QRLogin
|
from ..tl import types, functions, custom
|
||||||
from ..tl import types, functions
|
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from .telegramclient import TelegramClient
|
from .telegramclient import TelegramClient
|
||||||
|
@ -497,7 +496,7 @@ class AuthMethods:
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
async def qr_login(self: 'TelegramClient', ignored_ids: typing.List[int] = None) -> QRLogin:
|
async def qr_login(self: 'TelegramClient', ignored_ids: typing.List[int] = None) -> custom.QRLogin:
|
||||||
"""
|
"""
|
||||||
Initiates the QR login procedure.
|
Initiates the QR login procedure.
|
||||||
|
|
||||||
|
@ -530,7 +529,7 @@ class AuthMethods:
|
||||||
# Important! You need to wait for the login to complete!
|
# Important! You need to wait for the login to complete!
|
||||||
await qr_login.wait()
|
await qr_login.wait()
|
||||||
"""
|
"""
|
||||||
qr_login = QRLogin(self, ignored_ids or [])
|
qr_login = custom.QRLogin(self, ignored_ids or [])
|
||||||
await qr_login.recreate()
|
await qr_login.recreate()
|
||||||
return qr_login
|
return qr_login
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,4 @@ from .inlinebuilder import InlineBuilder
|
||||||
from .inlineresult import InlineResult
|
from .inlineresult import InlineResult
|
||||||
from .inlineresults import InlineResults
|
from .inlineresults import InlineResults
|
||||||
from .conversation import Conversation
|
from .conversation import Conversation
|
||||||
|
from .qrlogin import QRLogin
|
||||||
|
|
|
@ -2,8 +2,8 @@ import asyncio
|
||||||
import base64
|
import base64
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from telethon import events
|
from .. import types, functions
|
||||||
from telethon.tl import types, functions
|
from ... import events
|
||||||
|
|
||||||
|
|
||||||
class QRLogin:
|
class QRLogin:
|
Loading…
Reference in New Issue
Block a user