mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-10 10:49:39 +00:00
Replace most raw API usage with new location
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Errors not related to the Telegram API itself"""
|
||||
import struct
|
||||
|
||||
from ..tl import TLRequest
|
||||
from .. import _tl
|
||||
|
||||
|
||||
class ReadCancelledError(Exception):
|
||||
@@ -138,7 +138,7 @@ class MultiError(Exception):
|
||||
raise TypeError(
|
||||
"Expected an exception object, not '%r'" % e
|
||||
)
|
||||
if not isinstance(req, TLRequest):
|
||||
if not isinstance(req, _tl.TLRequest):
|
||||
raise TypeError(
|
||||
"Expected TLRequest object, not '%r'" % req
|
||||
)
|
||||
|
@@ -1,13 +1,13 @@
|
||||
from ..tl import functions
|
||||
from .. import _tl
|
||||
|
||||
_NESTS_QUERY = (
|
||||
functions.InvokeAfterMsgRequest,
|
||||
functions.InvokeAfterMsgsRequest,
|
||||
functions.InitConnectionRequest,
|
||||
functions.InvokeWithLayerRequest,
|
||||
functions.InvokeWithoutUpdatesRequest,
|
||||
functions.InvokeWithMessagesRangeRequest,
|
||||
functions.InvokeWithTakeoutRequest,
|
||||
_tl.fn.InvokeAfterMsg,
|
||||
_tl.fn.InvokeAfterMsgs,
|
||||
_tl.fn.InitConnection,
|
||||
_tl.fn.InvokeWithLayer,
|
||||
_tl.fn.InvokeWithoutUpdates,
|
||||
_tl.fn.InvokeWithMessagesRange,
|
||||
_tl.fn.InvokeWithTakeout,
|
||||
)
|
||||
|
||||
class RPCError(Exception):
|
||||
|
Reference in New Issue
Block a user