telegram.constants Module¶
Constants in the Telegram network.
The following constants were extracted from the Telegram Bots FAQ.
-
telegram.constants.
MAX_MESSAGE_LENGTH
¶ 4096
Type: int
-
telegram.constants.
MAX_CAPTION_LENGTH
¶ 1024
Type: int
-
telegram.constants.
SUPPORTED_WEBHOOK_PORTS
¶ [443, 80, 88, 8443]
Type: List[ int
]
-
telegram.constants.
MAX_FILESIZE_DOWNLOAD
¶ In bytes (20MB)
Type: int
-
telegram.constants.
MAX_FILESIZE_UPLOAD
¶ In bytes (50MB)
Type: int
-
telegram.constants.
MAX_MESSAGES_PER_SECOND_PER_CHAT
¶ 1. Telegram may allow short bursts that go over this limit, but eventually you’ll begin receiving 429 errors.
Type: int
-
telegram.constants.
MAX_MESSAGES_PER_SECOND
¶ 30
Type: int
-
telegram.constants.
MAX_MESSAGES_PER_MINUTE_PER_GROUP
¶ 20
Type: int
-
telegram.constants.
MAX_INLINE_QUERY_RESULTS
¶ 50
Type: int
The following constant have been found by experimentation:
-
telegram.constants.
MAX_MESSAGE_ENTITIES
¶ 100 (Beyond this cap telegram will simply ignore further formatting styles)
Type: int