diff --git a/telegram/constants.py b/telegram/constants.py index b3f4e9c5c..3c594fbe2 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -66,6 +66,7 @@ __all__ = [ "UpdateType", ] +import sys from typing import List, NamedTuple from telegram._utils.enum import IntEnum, StringEnum @@ -334,6 +335,13 @@ class FileSizeLimit(IntEnum): """:obj:`int`: Bots can download files of up to 20MB in size.""" FILESIZE_UPLOAD = int(50e6) # (50MB) """:obj:`int`: Bots can upload non-photo files of up to 50MB in size.""" + FILESIZE_UPLOAD_LOCAL_MODE = int(2e9) # (2000MB) + """:obj:`int`: Bots can upload non-photo files of up to 2000MB in size when using a local bot + API server. + """ + FILESIZE_DOWNLOAD_LOCAL_MODE = sys.maxsize + """:obj:`int`: Bots can download files without a size limit when using a local bot API server. + """ PHOTOSIZE_UPLOAD = int(10e6) # (10MB) """:obj:`int`: Bots can upload photo files of up to 10MB in size.""" diff --git a/tests/test_constants.py b/tests/test_constants.py index c006bbd04..f6b004b2a 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -49,6 +49,7 @@ class TestConstants: not key.startswith("_") # exclude imported stuff and getattr(member, "__module__", "telegram.constants") == "telegram.constants" + and key != "sys" ) } actual = set(constants.__all__)