mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Re-export the main modules and types from sync
For convenience. People can now easily replace: from telethon import TelegramClient, events with from telethon.sync import TelegramClient, events
This commit is contained in:
parent
61613ab6ac
commit
8bd9dd66ab
|
@ -1,9 +1,13 @@
|
||||||
from .client.telegramclient import TelegramClient
|
from .client.telegramclient import TelegramClient
|
||||||
from .network import connection
|
from .network import connection
|
||||||
from .tl import types, functions, custom
|
from .tl import types, functions, custom
|
||||||
|
from .tl.custom import Button
|
||||||
from . import version, events, utils, errors
|
from . import version, events, utils, errors
|
||||||
|
|
||||||
__version__ = version.__version__
|
__version__ = version.__version__
|
||||||
|
|
||||||
__all__ = ['TelegramClient', 'types', 'functions', 'custom',
|
__all__ = [
|
||||||
'events', 'utils', 'errors']
|
'TelegramClient', 'Button',
|
||||||
|
'types', 'functions', 'custom', 'errors',
|
||||||
|
'events', 'utils', 'connection'
|
||||||
|
]
|
||||||
|
|
|
@ -14,10 +14,13 @@ import asyncio
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
|
from . import connection
|
||||||
from .client.account import _TakeoutClient
|
from .client.account import _TakeoutClient
|
||||||
from .client.telegramclient import TelegramClient
|
from .client.telegramclient import TelegramClient
|
||||||
|
from .tl import types, functions, custom
|
||||||
from .tl.custom import (
|
from .tl.custom import (
|
||||||
Draft, Dialog, MessageButton, Forward, Message, InlineResult, Conversation
|
Draft, Dialog, MessageButton, Forward, Button,
|
||||||
|
Message, InlineResult, Conversation
|
||||||
)
|
)
|
||||||
from .tl.custom.chatgetter import ChatGetter
|
from .tl.custom.chatgetter import ChatGetter
|
||||||
from .tl.custom.sendergetter import SenderGetter
|
from .tl.custom.sendergetter import SenderGetter
|
||||||
|
@ -58,3 +61,10 @@ def syncify(*types):
|
||||||
|
|
||||||
syncify(TelegramClient, _TakeoutClient, Draft, Dialog, MessageButton,
|
syncify(TelegramClient, _TakeoutClient, Draft, Dialog, MessageButton,
|
||||||
ChatGetter, SenderGetter, Forward, Message, InlineResult, Conversation)
|
ChatGetter, SenderGetter, Forward, Message, InlineResult, Conversation)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
'TelegramClient', 'Button',
|
||||||
|
'types', 'functions', 'custom', 'errors',
|
||||||
|
'events', 'utils', 'connection'
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user