Make custom, functions and types proper modules

This allows "from telethon.types import Message" to work.
Closes #3929.

Not entirely sure how it used to work before, perhaps
it got changed at some point but this should revert previous
behaviour.
This commit is contained in:
Lonami Exo 2022-09-20 12:59:36 +02:00
parent 2f2a9901e2
commit 7cac3668d6
4 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,8 @@
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.custom import Button from .tl.custom import Button
from .tl import patched as _ # import for its side-effects from .tl import patched as _ # import for its side-effects
from . import version, events, utils, errors from . import version, events, utils, errors, types, functions, custom
__version__ = version.__version__ __version__ = version.__version__

1
telethon/custom.py Normal file
View File

@ -0,0 +1 @@
from .tl.custom import *

1
telethon/functions.py Normal file
View File

@ -0,0 +1 @@
from .tl.functions import *

1
telethon/types.py Normal file
View File

@ -0,0 +1 @@
from .tl.types import *